0

I have the following problem on my website: I've made no change, but yesterday all the special chars on all posts became wrong: for example < now is &lt;. If I open the post by admin, in "visual editing" mode, all the chars are correct.

May someone help me to solve, please?

Thank you in advance.

Edit: after some tests, the problems seems to be related only to the text between <pre> </pre> tags.

BlueTree
  • 179
  • 1
  • 13
  • Have you specified a `charset` in your document? – rnevius Nov 03 '14 at 09:23
  • Thank you for you comment. Yes, I' have "define('DB_CHARSET', 'utf8');" in my wp-config.php file. But my problem is that all worked fine since yesterday; now is wrong but I've made no change... – BlueTree Nov 03 '14 at 09:32
  • I'm talking about in the *header.php* of your site. Have you added ``? – rnevius Nov 03 '14 at 09:33
  • Yes, I've that tag in the header. – BlueTree Nov 03 '14 at 09:38
  • Sounds to me like WordPress has corrected your HTML for you. If these characters look OK in visual editing mode, then they will look OK in the web page. I don't see any problem here. ([More information here.](http://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html)) – r3mainer Nov 03 '14 at 09:49
  • I've made some test and the problem is related only to the text between
     tags.
    – BlueTree Nov 03 '14 at 09:54

1 Answers1

0

From the WordPress Codex on the <pre> tag:

The <pre> tag instructs the browser to use a monospaced font, but to exactly reproduce whatever is inside of the tags. Every space, line break, every bit of code is exactly reproduced.

rnevius
  • 26,578
  • 10
  • 58
  • 86
  • Yes, but I had no problem about that since yesterday. Now I have a misalignment amongst visual editinh, html editing and rendering on page. – BlueTree Nov 03 '14 at 10:16