Strange problems when I try to insert HTMLXML code snippet in my posts

I am experiencing some problems while trying to insert XML code snippet into my WordPress articles.

I have just read this tutorial: http://codex.wordpress.org/Writing_Code_in_Your_Posts

Read More

I am using the base WordPress editor to write my articles (not using other plugin)

I am using the SyntaxHighlighter Evolved plugin to enter code snippet inside my blog.

I am experiencing a strange behavior when I enter XML code snippet.

I enter the code snippet passing into the textual view in the editor and inserting here the following code:

[code language="xml"]
my XML code here
[/code]

Ok, if I save the articles when I am into the textual mode of the editor it automatically modifies the XML code by eliminating most of the information in this code snippet.

Instead seems that if a switch the editor in the visual mode and here I save, I don’t lose information and the code snippet is correctly shown in my article.

I have also try to insert some XMLHTML code into a <pre> tag but it don’t work. For example if I insert this code:

<pre>
<div>This is a div</div>
</pre>

this is not show a bow containing: <div>This is a div</div>

but a new div container is created and is shown: This is a div

Why?

How can I solve?

Can I work on WordPress filters to say it that have to do nothing text change when I post an article from the textual (HTML) view of my editor?

Related posts

Leave a Reply