Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291923

FilterHtml throws Unsupported operand types error when * used in tag attribute

$
0
0

Problem/Motivation

If an asterisk is added to an allowed html tag in the filter_html configuration an error is thrown due to code added in #3228334: Refactor HTMLRestrictionsUtilities to a HtmlRestrictions value object

See https://www.drupal.org/project/drupal/issues/3228334#comment-14440797 for more information.

Steps to reproduce

Install standard profile
Go to /admin/config/content/formats/manage/basic_html and add * to the list of allowed attributes on one of the tags (e.g <img * src...>
Save the format
Try to edit the format again

Error thrown:

Error: Unsupported operand types in Drupal\filter\Plugin\Filter\FilterHtml->filterAttributes() (line 122 of core/modules/filter/src/Plugin/Filter/FilterHtml.php). 

Proposed resolution

Remaining tasks


Viewing all articles
Browse latest Browse all 291923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>