mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Exclude more attributes from widget and editor component detection
This commit is contained in:
parent
cb229c2d66
commit
3e728dc6c2
1 changed files with 2 additions and 2 deletions
|
|
@ -449,11 +449,11 @@ class HTMLFilter
|
||||||
$attrs = array();
|
$attrs = array();
|
||||||
$html = preg_replace_callback('!([a-zA-Z0-9_-]+)="([^"]+)"!', function($attr) use($tag, &$attrs) {
|
$html = preg_replace_callback('!([a-zA-Z0-9_-]+)="([^"]+)"!', function($attr) use($tag, &$attrs) {
|
||||||
$attrkey = strtolower($attr[1]);
|
$attrkey = strtolower($attr[1]);
|
||||||
if ($tag === 'img' && preg_match('/^(?:width|height|alt)$/', $attrkey))
|
if ($tag === 'img' && preg_match('/^(?:width|height|src|alt|ismap|usemap)$/', $attrkey))
|
||||||
{
|
{
|
||||||
return $attr[0];
|
return $attr[0];
|
||||||
}
|
}
|
||||||
if (preg_match('/^(?:on|data-|(?:src|style|class|editor_component)$)/', $attrkey))
|
if (preg_match('/^(?:on|data-|(?:accesskey|class|contextmenu|contenteditable|dir|draggable|dropzone|editor_component|hidden|id|lang|name|style|tabindex|title)$)/', $attrkey))
|
||||||
{
|
{
|
||||||
return $attr[0];
|
return $attr[0];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue