HTML Tags Getting Stripped Out Of WordPress Via XMLRPC
| Share |
Got to love ever updating technology!
A few days ago I was setting up a new blog and could not figure out why the posts were all messed up. I had my programmers look through everything and nothing seemed to make sense. The problem was that once the post left my system and went into my WordPress installation, the html tags were being completely stripped out.
So instead of the html in the post looking like this…
<a href=”http://www.somesite.com”>Anchor text</a>
…it was looking like this…
ahref=”http://www.somesite.com”Anchor text/a
So… I Googled it!
Sure enough there was mention of an issue…
When posting from an application that uses the wordpress xmlrpc api, leading angle brackets are being stripped from the post.
…and thankfully someone already had a plugin fix for this.
http://josephscott.org/code/wordpress/plugin-libxml2-fix/
BUT… For some reason I could not get Joseph Scott’s plugin to work me.. so I put my main php guru on it to get it working for me… and voila, it worked!
So, the moral of the story is…
i. If you are not using XMLRPC – never mind this post.
ii. If you are using XMLRPC and everything is ok – never mind this post.
iii. If you are using xmlrpc and everything is NOT ok -
A) This is ultimately resolved with the release of PHP 5.2.9 and libxml2 2.7.3. –> So see if your host will do that for you
B) Download either Joseph Scott’s plugin and if that does not work, try my modification.
If you enjoyed this post, make sure you subscribe to my RSS feed!








font-weight:bold; text-decoration:none; } img {border:none;} John Cow dot ComHTML Tags Getting Stripped Out Of WordPress Via XMLRPCPosted: 08 Apr 2009 05:21 AM PDT Got to love ever updating technology! A few days ago I was setting up a new blog and could not figure out why the posts were all messed up. I had my programmers look through everything and nothing seemed to make sense. The problem
enormes problemas en la visualización de tu sitio. Esto parece ser debido a un fallo en la publicación XML-RPC de WordPress que ya se está manejando en el Trac pero, de momento, solucionable gracias a un plugin de Joseph Scott o unaversión modificada del fichero libxml2 publicada por John Cow. Así que ya sabes, si usas Windows Live Writer, ecto, Qumana o cualquier otro cliente de blogging de escritorio, y hasta que no se solucione el problema en la siguiente actualización de WordPress, usa el plugin o el fichero
enormes problemas en la visualización de tu sitio. Esto parece ser debido a un fallo en la publicación XML-RPC de WordPress que ya se está manejando en el Trac pero, de momento, solucionable gracias a un plugin de Joseph Scott o unaversión modificada del fichero libxml2 publicada por John Cow. Así que ya sabes, si usas Windows Live Writer, ecto, Qumana o cualquier otro cliente de blogging de escritorio, y hasta que no se solucione el problema en la siguiente actualización de WordPress, usa el plugin o el fichero
I like the first moral of the story. It is very funny, LOL.
Your modified version of the plugin unconditionally changes the XML. My original plugin checks to see if PHP is using a known problem version of libxml2. Did you perhaps update to libxml2 2.7.3 (the first fixed version) and not update PHP?
You’re never mind this post lol….
[...] and It works. Incase the plugin does not work you can also try out a modified version available at JohnCow [ Direct Download Link ] that implements the fix unconditionally irrespective of version of the xml [...]
Hi John,
I’m so glad you brought this up. I’ve been having a problem with my HTML tags disappearing and it’s been driving me crazy. I’ll be downloading the plug-in ASAP and see if that gets the problem resolved.
Thanks again for all you do,
Robert
should have read the moral of story first lol
what is XMLRPC???
try this tips now…thanx
Thanks for sharing this, i learn a lots..
@ Mxyzplk: XML-RPC is a protocol where you create an XML packet and post it to a web site which supports XML-RPC to accept a blog for pinging.
Lol, funny first part…. I was having trouble at first but did the same as you and googled for a solution.
Now let’s get rich!
Hello,
Thanks for the information. However, does it affect EVERYONE using XMLRPC?……or does it just happen to a few random people?
Hi John,
I'm so glad you brought this up. I've been having a problem with my HTML tags disappearing and it's been driving me crazy. I'll be downloading the plug-in ASAP and see if that gets the problem resolved.
Thanks again for all you do,
Robert
I have used the mdifies fix and still cannot get it to work.
My version of libXML is 2.6
Your modified plugin worked great! Thanks for sharing.