Commit f4f77fc8 authored by Dries's avatar Dries
Browse files

- Patch #45742 by chx: fixed problem with closed tags being filtered out.

parent 02938481
......@@ -1133,7 +1133,10 @@ function _filter_xss_split($m, $store = FALSE) {
if ($slash != '') {
return "</$elem>";
}
// Is there a closing XHTML slash at the end of the attributes?
$attrlist = preg_replace('%(\s?)/\s*$%', '\1', $attrlist);
// in PHP 5.1.0 we could count the changes, currently we need this
$xhtml_slash = preg_match('%\s?/\s*$%', $attrlist) ? ' /' : '';
// Clean up attributes
......
......@@ -1133,7 +1133,10 @@ function _filter_xss_split($m, $store = FALSE) {
if ($slash != '') {
return "</$elem>";
}
// Is there a closing XHTML slash at the end of the attributes?
$attrlist = preg_replace('%(\s?)/\s*$%', '\1', $attrlist);
// in PHP 5.1.0 we could count the changes, currently we need this
$xhtml_slash = preg_match('%\s?/\s*$%', $attrlist) ? ' /' : '';
// Clean up attributes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment