diff --git a/CHANGELOG-v3.md b/CHANGELOG-v3.md index d27d45d91b2..bf556ced0f2 100644 --- a/CHANGELOG-v3.md +++ b/CHANGELOG-v3.md @@ -5,6 +5,9 @@ ### Added - Email and URL fields now have “Placeholder Text” settings. ([#3397](https://github.com/craftcms/cms/issues/3397)) +### Changed +- The default HTML Purifier configuration now allows `download` attributes in `<a>` tags. ([craftcms/redactor#86](https://github.com/craftcms/redactor/issues/86)) + ### Fixed - Fixed a bug where the `ContentBehaviour` and `ElementQueryBehavior` classes could be missing some field properties. ([#3400](https://github.com/craftcms/cms/issues/3400)) - Fixed a bug where some fields within Matrix fields could lose their values after enabling the “Manage blocks on a per-site basis” setting. ([verbb/super-table/203](https://github.com/verbb/super-table/issues/203)) diff --git a/src/helpers/HtmlPurifier.php b/src/helpers/HtmlPurifier.php index 75340a0290c..2b8afe14468 100644 --- a/src/helpers/HtmlPurifier.php +++ b/src/helpers/HtmlPurifier.php @@ -68,6 +68,9 @@ public static function configure($config) // http://developers.whatwg.org/edits.html $def->addElement('ins', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']); $def->addElement('del', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']); + + // https://github.com/ezyang/htmlpurifier/issues/152#issuecomment-414192516 + $def->addAttribute('a', 'download', 'URI'); } } }