mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-12-16 10:21:00 +01:00
sanitize: strip comments and cdata sections
This commit is contained in:
parent
c7fe1b4e9e
commit
bed064442a
@ -2691,11 +2691,7 @@
|
|||||||
|
|
||||||
$res = trim($str); if (!$res) return '';
|
$res = trim($str); if (!$res) return '';
|
||||||
|
|
||||||
# we don't support CDATA sections in articles, they break our own escaping
|
$config = array('safe' => 1, 'deny_attribute' => 'style', 'comment' => 1, 'cdata' => 1);
|
||||||
$res = preg_replace("/\[\[CDATA/", "", $res);
|
|
||||||
$res = preg_replace("/\]\]\>/", "", $res);
|
|
||||||
|
|
||||||
$config = array('safe' => 1, 'deny_attribute' => 'style');
|
|
||||||
$res = htmLawed($res, $config);
|
$res = htmLawed($res, $config);
|
||||||
|
|
||||||
if (get_pref($link, "STRIP_IMAGES", $owner)) {
|
if (get_pref($link, "STRIP_IMAGES", $owner)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user