Added other allowed elements to sanitize()

The following html elements are now kept when sanitizing entries: aside, bdi, bdo, caption, col, colgroup, figure, figcaption, mark, ruby, rp, rt, samp, time. Most of them are new in HTML5. Based on the list at https://developer.mozilla.org/en-US/docs/HTML/HTML5/HTML5_element_list
This commit is contained in:
pictuga 2013-04-05 15:56:14 +03:00
parent 8edcbed6b7
commit 1701b96502
1 changed files with 9 additions and 7 deletions

View File

@ -2700,14 +2700,16 @@
}
$allowed_elements = array('a', 'address', 'audio', 'article',
'b', 'big', 'blockquote', 'body', 'br', 'cite', 'center',
'code', 'dd', 'del', 'details', 'div', 'dl', 'font',
'dt', 'em', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
'header', 'html', 'i', 'img', 'ins', 'kbd',
'li', 'nav', 'noscript', 'ol', 'p', 'pre', 'q', 's','small',
$allowed_elements = array('a', 'address', 'audio', 'article', 'aside',
'b', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br',
'caption', 'cite', 'center', 'code', 'col', 'colgroup',
'data', 'dd', 'del', 'details', 'div', 'dl', 'font',
'dt', 'em', 'footer', 'figure', 'figcaption',
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'html', 'i',
'img', 'ins', 'kbd', 'li', 'main', 'mark', 'nav', 'noscript',
'ol', 'p', 'pre', 'q', 'ruby', 'rp', 'rt', 's', 'samp', 'small',
'source', 'span', 'strike', 'strong', 'sub', 'summary',
'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead',
'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'time',
'tr', 'track', 'tt', 'u', 'ul', 'var', 'wbr', 'video' );
if ($_SESSION['hasSandbox']) $allowed_elements[] = 'iframe';