(str)
| 7 | const COMMENT_OPEN = /(<)(!--)/g |
| 8 | |
| 9 | function escapeHTMLInCSS(str) { |
| 10 | if (typeof str !== 'string') return str |
| 11 | if (!str.includes('<')) return str |
| 12 | return str.replace(STYLE_TAG, '\\3c $2').replace(COMMENT_OPEN, '\\3c $2') |
| 13 | } |
| 14 | |
| 15 | const DEFAULT_RAW = { |
| 16 | after: '\n', |