From: pictuga Date: Fri, 5 Apr 2013 12:56:14 +0000 (+0300) Subject: Added other allowed elements to sanitize() X-Git-Tag: 1.7.9~62^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1701b9650258858ca4119a6b4d0a41ce31b5277c;p=tt-rss.git 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 --- diff --git a/include/functions.php b/include/functions.php index 6f5db9a5..dc67b028 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';