Thread Starter
colins
(@colins)
Actually, the behaviour above is with the Textile plugin enabled. With it disabled, wrapping the xml in ‘pre’ tags alone does not work, since the xml is sent out as is and confuses the browser, while trying to add a CDATA inside the ‘pre’ tags also doesn’t work, since it seems WP escapes the CDATA element by adding a space after the initial ‘<‘.
Thread Starter
colins
(@colins)
Yes, that’s one solution. I was actually looking around in the meantime for some online service to escape XML/HTML.
It would still be nicer if this could be handled in WP directly though, as it’s still not very convenient to if you ever want to edit the original text. You basically have to copy the output text, modify it again, and then re-escape it and put it back in. Pretty laborious…
Colin
Thread Starter
colins
(@colins)
Scott,
It almost works, but does seem to have a weird issue where it eats some <props> tags. I have a big post with mixed text and xml fragments. The following
<pre>
<props>
<prop key=”get*”>PROPAGATION_REQUIRED,readOnly</prop>
<prop key=”find*”>PROPAGATION_REQUIRED,readOnly</prop>
<prop key=”load*”>PROPAGATION_REQUIRED,readOnly</prop>
<prop key=”store*”>PROPAGATION_REQUIRED</prop>
</props>
</pre>
(don’t know if the comment parser here will kill the stuff above) comes out with the ‘props’ elements taken out for some reason. In other parts of the post, the same thing was happening initially with the same elements, but now it’s ok. I have no clue what is going on. I can mail you the whole post if you wish to try it out…
Thread Starter
colins
(@colins)
Ok, that xml fragment got almost all swallowed. Let’s try again
<pre>
<props>
<prop key=”get*”>PROPAGATION_REQUIRED,readOnly</prop>
<prop key=”find*”>PROPAGATION_REQUIRED,readOnly</prop>
<prop key=”load*”>PROPAGATION_REQUIRED,readOnly</prop>
<prop key=”store*”>PROPAGATION_REQUIRED</prop>
</props>
</pre>