mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +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();
|
||||
$html = preg_replace_callback('!([a-zA-Z0-9_-]+)="([^"]+)"!', function($attr) use($tag, &$attrs) {
|
||||
$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];
|
||||
}
|
||||
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];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue