diff --git a/modules/filter.module b/modules/filter.module index 1a62d851821..0e345cce666 100644 --- a/modules/filter.module +++ b/modules/filter.module @@ -1133,7 +1133,10 @@ function _filter_xss_split($m, $store = FALSE) { if ($slash != '') { return ""; } + // 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 diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 1a62d851821..0e345cce666 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -1133,7 +1133,10 @@ function _filter_xss_split($m, $store = FALSE) { if ($slash != '') { return ""; } + // 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