summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-19 14:32:26 +0400
committerAndrew Dolgov <[email protected]>2013-03-19 14:32:26 +0400
commit10b55a120ce1c937325921b699cd6264d5c35e68 (patch)
treeb988f568ca68cab75181c6a32fd35c892acbc177 /include
parent23923ca726c0d93db6dd81eb8d94d6b5f04310eb (diff)
strip_harmful_tags: expand the allowed list
Diffstat (limited to 'include')
-rw-r--r--include/functions.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/functions.php b/include/functions.php
index 50bdc13ae..8dba74618 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -2624,9 +2624,15 @@
function strip_harmful_tags($doc) {
$entries = $doc->getElementsByTagName("*");
- $allowed_elements = array('p', 'br', 'div', 'table', 'tr', 'td', 'th',
- 'ul', 'ol', 'li', 'blockquote', 'span', 'html', 'body', 'a', 'img',
- 'video', 'audio', 'source', 'object', 'embed');
+ $allowed_elements = array('a', 'address', 'audio',
+ 'b', 'big', 'blockquote', 'body', 'br', 'cite',
+ 'code', 'dd', 'del', 'details', 'div', 'dl',
+ 'dt', 'em', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
+ 'header', 'html', 'i', 'iframe', 'img', 'ins', 'kbd',
+ 'li', 'nav', 'ol', 'p', 'pre', 'q', 's','small',
+ 'source', 'span', 'strike', 'strong', 'sub', 'summary',
+ 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead',
+ 'tr', 'track', 'tt', 'u', 'ul', 'var', 'wbr', 'video' );
if ($_SESSION['hasSandbox']) array_push($allowed_elements, 'iframe');