Why doesn't this display correctly when inserted as text in a blog post?
-
<div id=”jg-widget-huwsayer-425″></div><script>(function(){var id=”jg-widget-huwsayer-425″,doc=document,pfx=(window.location.toString().indexOf(“https”)==0)?”https”:”http”;var el=doc.getElementById(id);if(el){var js=doc.createElement(‘script’);js.src=pfx+”://widgets.justgiving.com/fundraisingpage/huwsayer?enc=ZT1qZy13aWRnZXQtaHV3c2F5ZXItNDI1Jnc9NDAwJmI9aW5uZXIsZG9uYXRlJmliPXN1bW1hcnkscHJvZ3Jlc3MscmFpc2VkLHRhcmdldA%3D%3D”;el.parentNode.insertBefore(js, el);}})();</script>
This line of code is supposed to create a sponsorship widget – it works on wordpress.org when I insert it in a blog – but it doesn’t work on wordpress.com when I try to do exactly the same thing. Why is this – it appears to cut this bit of code <div id=”jg-widget-huwsayer-425″></div><script> and leaves the rest as just plain text.
I’ve looked on troubleshooting and understand that some code is stripped out if it’s a security risk but it says <div> is fine (and doesn’t mention <script>.
Any clues?
Thank you
The blog I need help with is: (visible only to logged in users)
-
Hi,
Unfortunately, JavaScript is not allowed here in WordPress.com so you can’t use that particular embed code.
Here’s a list of codes that are allowed and not allowed.
http://en.support.wordpress.com/code/Hope that helps!
-
-
- The topic ‘Why doesn't this display correctly when inserted as text in a blog post?’ is closed to new replies.