mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-09 01:26:50 +01:00
Allow data-* attributes (#1489860)
This commit is contained in:
@@ -1232,7 +1232,7 @@ EOF;
|
||||
|
||||
// generate html code for button
|
||||
if ($btn_content) {
|
||||
$attrib_str = html::attrib_string($attrib, array_merge($link_attrib, array('data-*')));
|
||||
$attrib_str = html::attrib_string($attrib, $link_attrib);
|
||||
$out = sprintf('<a%s>%s</a>', $attrib_str, $btn_content);
|
||||
}
|
||||
|
||||
|
||||
@@ -283,10 +283,9 @@ class html
|
||||
continue;
|
||||
}
|
||||
|
||||
// ignore not allowed attributes
|
||||
// ignore not allowed attributes, except data-*
|
||||
if (!empty($allowed)) {
|
||||
$is_data_attr = @substr_compare($key, 'data-', 0, 5) === 0;
|
||||
if (!isset($allowed_f[$key]) && (!$is_data_attr || !isset($allowed_f['data-*']))) {
|
||||
if (!isset($allowed_f[$key]) && @substr_compare($key, 'data-', 0, 5) !== 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user