Hi, if I try to put something like:
<span style="font-weight: bold;">
the "style=..." part gets stripped from the code. I have allowed 'Filtered HTML' input format to accept spans. How to make it work? Many RTEs are using this kind of formatting instead of 'strong' or 'b'.

Comments

Heine’s picture

You can't make this work with the HTML filter; it always strips the style attribute as its contents can be used to execute JavaScript.

--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

arh1’s picture

if you're using a rich text editor, it should be using the 'strong' tag for simple bolding. (what editor are you using that inserts 'span' tags for that? the only RTE i've used with Drupal is TinyMCE.)

if you want to manually edit your HTML, you could just create a class in your stylesheet, and use that instead of the 'style' attribute. (better coding practice, anyway...)

encho’s picture

FCK and NicEdit. I prefer using those two. Guess I'll have to switch to TinyMCE then :-(

seaji’s picture

TinyMCE align button uses style="text-aling: center" attribute.
And all other editors too.
What shoud I do? Disable "Filtered HTML"???

Viatcheslav Joukov

Naturalist’s picture

Why the editors are not using div tags etc. is the question.