Commit 548e5d2b authored by Steven Wittens's avatar Steven Wittens
Browse files

- #45742: XHTML slash fix.

parent f4f77fc8
......@@ -1135,9 +1135,9 @@ function _filter_xss_split($m, $store = FALSE) {
}
// 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
// In PHP 5.1.0+ we could count the changes, currently we need a separate match
$xhtml_slash = preg_match('%\s?/\s*$%', $attrlist) ? ' /' : '';
$attrlist = preg_replace('%(\s?)/\s*$%', '\1', $attrlist);
// Clean up attributes
$attr2 = implode(' ', _filter_xss_attributes($attrlist));
......
......@@ -1135,9 +1135,9 @@ function _filter_xss_split($m, $store = FALSE) {
}
// 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
// In PHP 5.1.0+ we could count the changes, currently we need a separate match
$xhtml_slash = preg_match('%\s?/\s*$%', $attrlist) ? ' /' : '';
$attrlist = preg_replace('%(\s?)/\s*$%', '\1', $attrlist);
// Clean up attributes
$attr2 = implode(' ', _filter_xss_attributes($attrlist));
......
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