Hi guys,
Im trying to place adsense code within my editor and whilst it looks fine within the source code preview it is being rendered differently to screen. This is proving quite frustrating as Im wanting to display adsense within my articles.
The text entered looks like this...
<script type="text/javascript">
google_ad_client = "pub-XXXXXXXXXXXXXXXXXX";
/* Article Box Ad 300x250, created 26/05/08 */
google_ad_slot = "XXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Then within the actual page (nothing is displayed onscreen) and when viewing the HTML source code I end up with this...???
<script type=text/javascript><br>google_ad_client = pub-XXXXXXXXXXXXXXXXXX;<br>/* Article Box Ad 300x250, created 26/05/08 */<br>google_ad_slot = XXXXXXXXXXXXX;<br>google_ad_width = 300;<br>google_ad_height = 250;<br>//--><br></script><br><script type=text/javascript<br>src=http://pagead2.googlesyndication.com/pagead/show_ads.js><br></script>
As you can see Ive got all these crazy <br>'s in there as well as numerous double quotes being removed!
Can someone please tell me how I can correct this? Is it a case of simply updating my version? How can I check against what version I have to confirm?
John
Wed, 05/28/2008 - 04:25
#1
Re: Fckeditor and Google Adsense
I just went to our online demo and pasted those scripts. The editor is leaving them untouched, as expected. So, it seems that the problem is located in your system. Couldn't it be that your CMS has some kind of filter that is modifying the contents produced with FCKeditor?
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Fckeditor and Google Adsense
That does seem to work great which is good news. I've been having problems with this AddThis Code. It's definately rewriting this in the demo.
I have a post regarding this but haven't had any luck with anybody.
http://www.fckeditor.net/forums/viewtopic.php?f=6&t=13465
Re: Fckeditor and Google Adsense
It's also helpful to put your AdSense and other Javascript code within a table or something long those lines so you can see where it is when editing, otherwise it's easy to delete by accident.