Support » Fixing WordPress » WordPress interpreting html code strangely

  • Resolved jami1955


    The blog looks good, everything works. Then I took a peak at the source code the browser is using. Woooo.
    The ENTIRE style sheets are printed totally out in the source code, instead of importing them via the link, wordpress has somehow instructed the browser (Firefox 4.0) to print out all 5 of the stylesheets in the header.

    So in the header, the first stylesheet is called like this:
    <link rel="stylesheet" href="" type="text/css" media="screen" />
    and then two more for IE like this:
    <!--[if lte IE 7]><link rel="stylesheet" href="" type="text/css" media="screen" /><![endif]-->

    However, what appears in the header is something entirely different, which is, in place of <link rel=”stylesheet” href=”” type=”text/css” media=”screen” /> this appears:

    <style media="screen" type="text/css" style="display:none">/**/@import url( ...

    and then it goes on printing out all 5 stylesheets. View the source here

    The source code is really strange and a bit ugly. Does anyone know why this is happening, and how to fix it so the stylesheets are simply imported as usual?


Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael


    Forum Moderator

    total normal in firefox3.6;
    i.e. the <link ... code

    possibly a ‘feature’ of firefox4 (?)

    That’s a relief it’s normal in another browser. However, just now testing it in Safari 5.0.5, it does the same thing, prints everything out… so it’s not Firefox in particular. Interesting tho FF 3.6 is looking normal in the source code.
    Other ideas? I switched out the call for the url, replaced
    <?php bloginfo('template_directory'); ?>
    with the literal url, and that didn’t help.


    I just looked at the code of this forum page, and it’s doing the same thing, so I will write into the FF people and ask them what’s going on. This page is rendered in the code like this:

    <style type="text/css">/* The Reset ---------------------------------- */
    th,td { margin: 0; padding: 0; }
    fieldset,img,abbr { border: 0; }
    h4,h5,h6,th,var { font-style: normal; font-weight: normal; }
    caption,th { text-align: left; }
    q:before,q:after { content: ''; }
    a { text-decoration: none; }
    body {

    I mean, what is “/* The Reset ———————————- */” ??
    Also, as far as I know “<style type=”text/css”>” is not a proper header tag, so FF is def. doing something weird. But then why would Safari be doing exactly the same thing?

    Oh, wait a min. I’m using a German USB stick modem right now. I wonder…. if that could be it. The network is the mobile phone network, and I’ve noticed it does strange things to the data transfer sometimes. I will check again in a few hours when I’m having a regular int. connection.

    FYI, it was the network. BILD Zeitung USB stick modem, Germany, I don’t know how they manage it, but that source code in the browser was very ugly. Off topic, if Hillary has her way, the entire US and Europe will have “safe” internet. That code will also probably be pretty ugly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress interpreting html code strangely’ is closed to new replies.