MDL-76203 weblib: Add BDI support to the HTML purifier

This commit is contained in:
Lior Gil
2023-07-02 09:05:27 +03:00
parent 8dbb6183ff
commit e464bf3c7d
+3
View File
@@ -1927,6 +1927,9 @@ function purify_html($text, $options = array()) {
$def->addElement('algebra', 'Inline', 'Inline', array()); // Algebra syntax, equivalent to @@xx@@.
$def->addElement('lang', 'Block', 'Flow', array(), array('lang'=>'CDATA')); // Original multilang style - only our hacked lang attribute.
$def->addAttribute('span', 'xxxlang', 'CDATA'); // Current very problematic multilang.
// Enable the bidirectional isolate element and its span equivalent.
$def->addElement('bdi', 'Inline', 'Flow', 'Common');
$def->addAttribute('span', 'dir', 'Enum#ltr,rtl,auto');
// Media elements.
// https://html.spec.whatwg.org/#the-video-element