3

I'm using the "Limit allowed HTML tags" filter in my text format and put this to the allowed tags: <th style>

Anyway my table styling <th style="width: 60%;"> added in Ckeditor is filtered out. What have I missed?

3

style="width: 60%;" is an html attribute, not a tag.

I put this to the allowed tags: <th style>

Therefore, you need to remove the style part and just put table header tag <th> in the allowed tags.

| improve this answer | |
  • 6
    It's possible to allow attributes for a tag. But not style, which is always removed by the "Limit allowed html tags" filter, because you can use it for XSS attacks. – 4k4 Jan 5 '17 at 7:44
  • 2
    ok, there is really nothing which doesn't exist... so, then I have no choice than adding classes and style it in the css file. – 0711master Jan 5 '17 at 10:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.