Forums

My WP is changing the formatting of characters in my blogs (2 posts)

  1. zastrow
    Member
    Posted 1 year ago #

    My WP is changing the formatting of characters in my blogs.

    For instance; how-to-create-an-ie-only-stylesheet

    When I go to edit the blog; it properly shows;

    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="all-ie-only.css" />
    <![endif]-->

    but displays it differently, effectively changing the code to this;

    <!–[if IE]>
    <link rel=”stylesheet” type=”text/css” href=”all-ie-only.css” />
    <![endif]–>

    That's a huge difference to change from; "<!--" to this; "<!–"

    I notice other format changes here and there. why is it doing this? I'm using UTF-8

  2. jonradio
    Member
    Posted 1 year ago #

    All the WordPress sites I've seen that need to display Code of one kind or another use a plug-in to display it properly. Judging by that, and my own limited experience displaying code, tells me that you should be looking for an appropriate plug-in and not relying on "native WordPress".

    After I wrote the above, I found the official documentation on the subject: http://codex.wordpress.org/Writing_Code_in_Your_Posts

    I'm not sure how old the article is, so beware its recommendation of plug-ins, and make sure they still work with the current version of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Topic