summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpictuga <[email protected]>2013-04-05 15:56:14 +0300
committerpictuga <[email protected]>2013-04-05 15:56:14 +0300
commit1701b9650258858ca4119a6b4d0a41ce31b5277c (patch)
tree61679647cd52980eb33faa4a54a4dd6d6e665371 /include
parent8edcbed6b753639b6366b11200d26cba0c52c862 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/functions.php16
1 files changed, 9 insertions, 7 deletions
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';