wordpress unescaping code blocks

It seems that if I create a code block like the following,

template <typename T>
void f(T a, T b) {
  std::string s = "result: ";
  std::cout << s << a + b << '\n';
}

then publish, edit, publish, it escapes and reescapes the html in it after the edit. This is quite hideous.

template &lt;typename T&gt;
void f(T a, T b) {
  std::string s = &quot;result: &quot;;
  std::cout &lt;&lt; s &lt;&lt; a + b &lt;&lt; '\n';
}

and it stacks, each time I edit, it gets worse

template &amp;lt;typename T&amp;gt;
void f(T a, T b) {
  std::string s = &amp;quot;result: &amp;quot;;
  std::cout &amp;lt;&amp;lt; s &amp;lt;&amp;lt; a + b &amp;lt;&amp;lt; '\n';
}

Pretty rough. I’ll have to find a way around this.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s