mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Allow XML attributes with colons to be read by kses.
The attribute would still need to be whitelisted to get through the filters. props jorbin. fixes #17847. Built from https://develop.svn.wordpress.org/trunk@27707 git-svn-id: http://core.svn.wordpress.org/trunk@27546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
156a5a234f
commit
f9fd129f28
@ -763,10 +763,10 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
||||
switch ($mode) {
|
||||
case 0 : # attribute name, href for instance
|
||||
|
||||
if (preg_match('/^([-a-zA-Z]+)/', $attr, $match)) {
|
||||
if ( preg_match('/^([-a-zA-Z:]+)/', $attr, $match ) ) {
|
||||
$attrname = $match[1];
|
||||
$working = $mode = 1;
|
||||
$attr = preg_replace('/^[-a-zA-Z]+/', '', $attr);
|
||||
$attr = preg_replace( '/^[-a-zA-Z:]+/', '', $attr );
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user