| 1 |
/** |
| 2 |
* HTML Sanitization Constants |
| 3 |
* Used for sanitizing HTML content in form fields |
| 4 |
*/ |
| 5 |
|
| 6 |
export const ALLOWED_HTML_TAGS = [ |
| 7 |
'p', |
| 8 |
'br', |
| 9 |
'strong', |
| 10 |
'b', |
| 11 |
'em', |
| 12 |
'i', |
| 13 |
'u', |
| 14 |
'a', |
| 15 |
'ul', |
| 16 |
'ol', |
| 17 |
'li', |
| 18 |
'h1', |
| 19 |
'h2', |
| 20 |
'h3', |
| 21 |
'h4', |
| 22 |
'h5', |
| 23 |
'h6', |
| 24 |
'blockquote', |
| 25 |
'code', |
| 26 |
'pre', |
| 27 |
'span', |
| 28 |
'div', |
| 29 |
'img', |
| 30 |
] |
| 31 |
|
| 32 |
export const ALLOWED_HTML_ATTR = { |
| 33 |
global: ['class', 'style'], |
| 34 |
a: ['href', 'target', 'rel'], |
| 35 |
img: ['src', 'alt', 'width', 'height'], |
| 36 |
} |
| 37 |
|