mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 04:35:55 +00:00
Remove href attribute if it executes JavaScript.
This commit is contained in:
@@ -1064,6 +1064,10 @@
|
|||||||
array_push($attrs_to_remove, $attr);
|
array_push($attrs_to_remove, $attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($attr->nodeName == 'href' && stripos($attr->value, 'javascript:') === 0) {
|
||||||
|
array_push($attrs_to_remove, $attr);
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array($attr->nodeName, $disallowed_attributes)) {
|
if (in_array($attr->nodeName, $disallowed_attributes)) {
|
||||||
array_push($attrs_to_remove, $attr);
|
array_push($attrs_to_remove, $attr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user