Why does WordPress Strip Style Information?
-
Most of my users are not technically oriented, and so probably won’t notice this kind of thing at all, but for myself, I’d love to know why WordPress gobbles up my inline style data. It also has a tendency to move element attributes around.
Say I want to make a few words red. I try to write:
<span style="color: #ff0000;">Headline News!</span>
…but the resulting post has:
<span>Headline News!</span>
…and so does the raw post as seen in the editing window.Similarly, if I write:
<img src="animage.png" border="1" height="188" hspace="10" width="250" align="right" />
…I get:
<img src="animage.png" align="right" border="1" height="188" hspace="10" width="250" />
That’s not SO bad, but weird; like it’s doing extra work on the code when it doesn’t have to. Why won’t it just take what I give it? (And, incidentally, align=”right” isn’t valid HTML anymore, so why is the WYSIWYG editor be putting it out?)
I’m using the plain text (“code”) editor. The WYSIWYG editor is horrific, if I may say so, and I renamed the directory where it lives to keep people from using it. (Incidentally, there seem to be a lot of forum topics about disabling this editor, and I don’t know about the rest of you, but there are NO options in either the site admin or the user admin pages for disabling the WYSIWYG editor. No check boxes, no select menus, nothing. I only see check boxes for Convert emoticons like ?? and ?? to graphics on display and WordPress should correct invalidly nested XHTML automatically.)
Can someone tell me why WordPress does these shifty things? It’s discomfiting to enter something and have it stripped away without so much as a by-your-leave. Is there a way to keep WordPress from performing these naughty tricks? I know I’m new here, but it seems to me that software shouldn’t massage your data like this. If the user puts something ugly in, the user gets something ugly out, and must therefore correct it. The software should just do what it’s told. ??
(edited to correct a typo)
- The topic ‘Why does WordPress Strip Style Information?’ is closed to new replies.