Reputation: 1433
I had written a blog post in WordPress and checked its preview before publishing and noticed a strange format change in the HTML code I have added in my blog post, converting (encoding) the < and > characters into their (<) and (>).
Is there a plugin I can add for displaying the code as it is?
Upvotes: 1
Views: 420
Reputation: 287
I replaced the <
character with a special character 〈
, and the >
character by 〉
just to prevent rendering my HTML code on my blog.
Upvotes: 0
Reputation: 1433
After a long research and help from my seniors, I got this solution for restricting the WordPress from converting (encoding) the <
and >
characters into their (<) and (>) equivalents:
You can use:
<pre class="lang:html decode:true ">
/* Some HTML code here */
</pre>
Upvotes: 2