diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 399757910b3..436b0e14810 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,8 @@ Drupal 7.37, xxxx-xx-xx (development version) ----------------------- +- Allowed custom HTML tags with a dash in the name to pass through filter_xss() + when specified in the list of allowed tags. - Allowed hook_field_schema() implementations to specify indexes for fields based on a fixed-length column prefix (rather than the entire column), as was already allowed in hook_schema() implementations. diff --git a/includes/common.inc b/includes/common.inc index b7b9562d456..cd301455332 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1522,7 +1522,7 @@ function _filter_xss_split($m, $store = FALSE) { return '<'; } - if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?|()$%', $string, $matches)) { + if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9\-]+)([^>]*)>?|()$%', $string, $matches)) { // Seriously malformed. return ''; } diff --git a/modules/filter/filter.test b/modules/filter/filter.test index fe9cfc36669..ddea6afb579 100644 --- a/modules/filter/filter.test +++ b/modules/filter/filter.test @@ -1148,7 +1148,7 @@ class FilterUnitTestCase extends DrupalUnitTestCase { // Setup dummy filter object. $filter = new stdClass(); $filter->settings = array( - 'allowed_html' => '