• I am trying to add a Google FriendConnect page to my blog at adir1.com, but it seems that there is some fancy mechanism that filters quotes and messes up the Google FriendConnect JavaScript

    Basically, I want it to appear as it’s own page, so I created extra page, switched to HTML in Dashboard editor and pasted in perfectly valid JavaScript. I even confirmed that it saved properly into the database, but when it shows, Page-Source shows ‘ replace quotes “sometimes”, breaking good script. Here’s an example of a line:

    skin['ENDCAP_BG_COLOR'] = ‘#e0ecff’;

    It is definitely some sort of filter — Any ideas how do I avoid it for just this page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Might work to make a separate template from page.php, copy your script in that template file and when you create a new page, tell WP to use the template file you’re using.

    Thread Starter adir1

    (@adir1)

    Thanks for the tip.

    Though I am sad that I have to go to all this trouble to add one small JavaScript. The suggested plugin was a bit old, so I decided against it. Wrote my own little JS file and included it, that fixed it…

    Earlier, I tried putting my Javascript into wp_posts table directly, into post_content_filtered column. But it was completely ignored.

    Seems to me since the column is there and is being read by WP (I see it in code), why is it ignoring the content? Any thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress page filtering of JavaScript’ is closed to new replies.