summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-01-25 19:20:28 +0000
committerDries Buytaert <dries@buytaert.net>2006-01-25 19:20:28 +0000
commitf4f77fc8513bc6183c03d7d96741d74788853f86 (patch)
treef6ee90d18447fd96e721873756fc1e5b2ade7fbf /modules
parent02938481995664b80b8711a5e1b74f7e9f3e65f9 (diff)
downloadbrdo-f4f77fc8513bc6183c03d7d96741d74788853f86.tar.gz
brdo-f4f77fc8513bc6183c03d7d96741d74788853f86.tar.bz2
- Patch #45742 by chx: fixed problem with closed tags being filtered out.
Diffstat (limited to 'modules')
-rw-r--r--modules/filter.module3
-rw-r--r--modules/filter/filter.module3
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/filter.module b/modules/filter.module
index 1a62d8518..0e345cce6 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -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
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 1a62d8518..0e345cce6 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 "</$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