I was experimenting in D8 with filters on text-formats to understand why i was not seeing CSS i had placed in a block.

Turning on and off Limit allowed HTML tags and correct faulty HTML and Correct faulty and chopped off HTML i saw that the limit filter was not only applied to the output, but the results were also saved to the block. That's in contrast to the description on the text-format config page:

A text format contains filters that change the display of user input

Then when i saw that without any filters on, a &lt:style> tag was turned into &lt:style type="text/css"> it became clear that CKEditor was doing his thing too... Sure enough, after disabling the editor, the limit filter only altered the output.

Now, my questions:

Is this described behaviour all as intended? If so, what's the logic? And, shouldn't the fact be described in the UI that enabling an Editor changes the filter's behaviour?

Or is this a bug?

  • logic -> Its bad practice to put styles in a field, styles should only be added via theme or module. – taggartJ Jan 13 at 23:46
  • Thanks. I know where style ideally should go, see the linked D.O. Post for the reasoning in this case (quick fix for admin theme). But that's off-topic here, it's no question on styles, it is about input filters. – sirtet Jan 14 at 10:02

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.