2

allowed_html: <a href hreflang title id target rel class=""> I copied this from the settings of the filter_html plugin in a filter format config entity. I am intrigued by the class="" part. I looked at both FilterHtml::getHTMLRestrictions processing this and FilterAPITest and I found a test for 'allowed_html' => '<a> <b class> <c class="*"> <d class="foo bar-* *">' but not class="". So how is class="" different from just class or class="*" or omitting class altogether?

  • Class should not be empty, that's all. – leymannx Aug 6 '19 at 7:48
  • Do you mean this configuration is invalid? Or that <a class="foobar"> is accepted in the editor but <a class=""> isn't? How is that different from class="*"? So confusing... – Smartsheet eng Aug 6 '19 at 7:52
  • 1
    I don't see why this has close votes. Question could use a little editing for posterity, but it is a valid and interesting question and perfectly clear to me and could have a nice answer to help users in the future. – mpdonadio Aug 6 '19 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.