From 1701b9650258858ca4119a6b4d0a41ce31b5277c Mon Sep 17 00:00:00 2001 From: pictuga Date: Fri, 5 Apr 2013 15:56:14 +0300 Subject: 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 --- include/functions.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/functions.php b/include/functions.php index 6f5db9a5f..dc67b028a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -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'; -- cgit v1.2.3