The rich text editor is munging my HTML
-
Hello all,
I am writing a filter plugin that uses ‘the_content’ as a hook. The plugin will allow me to enter a tag like ‘[ipl 10]’ as the href of a link (where 10 is the page_id of a post).
I found an interesting issue with the rich text editor. If I insert something like this into the code view, it saves fine, but when I edit again the editor munges the HTML.
To illustrate, I use the code editor to enter this as the opening tag of a link (enclosed in pointy brackets):
a href=”[ipl 10]”
When I hit “Save” it saves just fine. If I view the page, my plugin works just fine. But if I go to edit the page again, when the HTML comes up in the editor, I see a brief flash where the HTML is displayed and it is still correct. Then the Visual display take over. However, when I switch to the code view, my tag ([ipl 10]) has been replaced by:
https://www.mysite.net/wp-admin/%5Bipl%2010%5D
I have done the following in an attempt to narrow down the problem: i) turned off all plugins, including mine; ii) deleted my plugin file from the server iii) used the “WordPress Default 1.6” theme; and iv) tried in IE6 and 7, and Firefox 1.5 and 2. The issue doesn’t go away.
It seems as though the Rich Text editor is trying to substitute a trackback link for my tag.
Any help on this would be appreciated.
Best Regards,
Josh
- The topic ‘The rich text editor is munging my HTML’ is closed to new replies.