views:

66

answers:

2

hi,

I came accross something very strange when i was testing my pages in FireFox. The Adsense blocks are commented out (green) in firefox.

It does render however properly when i paste all the rendered code in a blank aspx page in the same project without using masterpage.

http://picpaste.com/problem.jpg

Here's a picture of the problem. As you can see on one of the pages the script code is green. How is that possible?

+1  A: 

The version that doesn't work correctly is defined as XHTML. This means that <!-- will always open a comment, even inside a script tag.

You can remove the comment tag as it isn't needed, and you should put the contents of the script tag in a CDATA block:

<script type="text/javascript">
<![CDATA[
// script goes here
]]>
</script> 
interjay
Did that. Now neither work. No errors, no nothing.
Jeroen
A: 

Solved. the page was sent as application/xhtml+xml which has to be text/html. Although not defined as such it did send it with that content-type.

Any solutions on how to get AdSense work on firefox with content-type application/xhtml+xml?

Jeroen
Try updating your question (click 'edit') instead, so people see it. Or accept this as one solution and open another question. (Can't tell how related they are.)
D_N