1

I followed the instructions fr google preffify and all I get is a box with nonthing in it on the page. WHere did I go wrong? I get 200 for the includes.

 <link href="static/js/google-code-prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="static/js/google-code-prettify/prettify.js"></script>


<body onload="prettyPrint()">


        <pre class="prettyprint"><code class="language-html">
            <img src="http://cm.g.doubleclick.net/pixel?google_nid=tt&google_cm&avid=9000&tag=alaska&campaign_id=8002" /> 
        </code></pre>

        <pre class=prettyprint>
            <img src='http://cm.g.doubleclick.net/pixel?google_nid=tt&google_cm&avid=9000&tag=alaska&campaign_id=8002' /> 
        </pre>


</body>
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Tampa
  • 75,446
  • 119
  • 278
  • 425

2 Answers2

2

If you're expecting the <img> tags to be prettified, that's not going to work; the browser is going to interpret them.

Try escaping the < etc:

&lt;img src="http://cm.g.doubleclick.net/pixel?google_nid=tt&google_cm&avid=9000&tag=alaska&campaign_id=8002" /&gt;

edit — however, that tool doesn't appear to have an HTML module.

Pointy
  • 405,095
  • 59
  • 585
  • 614
0

escaping the "<" and ">" will make it work

    <pre class="prettyprint"><code class="language-html">
        &lt;img src="http://cm.g.doubleclick.net/pixel?google_nid=tt&google_cm&avid=9000&tag=alaska&campaign_id=8002" /&gt;
    </code></pre>

    <pre class=prettyprint>
        &lt;img src='http://cm.g.doubleclick.net/pixel?google_nid=tt&google_cm&avid=9000&tag=alaska&campaign_id=8002' /&gt;
    </pre>

uncaught_exception
  • 1,068
  • 6
  • 15