(str, encode = true)
| 12 | } from "./HelmetConstants.js"; |
| 13 | |
| 14 | const encodeSpecialCharacters = (str, encode = true) => { |
| 15 | if (encode === false) { |
| 16 | return String(str); |
| 17 | } |
| 18 | |
| 19 | return String(str) |
| 20 | .replace(/&/g, "&") |
| 21 | .replace(/</g, "<") |
| 22 | .replace(/>/g, ">") |
| 23 | .replace(/"/g, """) |
| 24 | .replace(/'/g, "'"); |
| 25 | }; |
| 26 | |
| 27 | const getTitleFromPropsList = propsList => { |
| 28 | const innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE); |
no outgoing calls
no test coverage detected
searching dependent graphs…