[Solved] Blogger Not Accepting Javascript / Error Parsing XML


If you are blogging for even 2 months you must have seen this error once when you tried to add a javascript in you blog theme. This error appears when a javascript contains some symbols like $ or & or sometime =. All these errors show error when theme is saved. and the error says "Error parsing XML, line number, column number: The reference to entity "version" must end with the 'example' delimiter".


As shown in above image, blogger is not accepting Facebook like button code and showing error. To solve this error I have to simply make this code acceptable by blogger.

You might have problem saving codes of some ads like media.net ads, chitika ads, bidvertiser ads etc all these ads are sometimes not accepted by blogger so you can fix them by following this post and run ads or custom scripts.


How to add javascript codes in blogger without parsing error ?


Follow below steps:

(1). Grab the javascript code which you want to fix in to a notepad or paste it in your blog's <head> or elsewhere in your blog template.

(2). Copy below piece of Text / HTML tag.

//<![CDATA[

(3). Now paste it after <script> or <script type='text/javascript'> of your javascript code.

(4). Now find the closing tag of your script i.e <script> and paste below piece of HTML above it.

//]]>

(5). Save your theme.

You didn't see any error right ? if this worked for you feedback and share this post with others. If not share your problem by leaving a comment below.

Your final code should be like below:


<script type='text/javascript'>
//<![CDATA[
function myFunction() {
var btn = document.createElement("Click");
window
.open("URL")
}
//]]>
</script>

Though it is a small error but I thought to share how to fix it because it is asked by many bloggers who encountered this error. Hope it helps!

Thanks for visiting +101helper.

Search keywords: blogger not accepting javascript error,how to add javascript in blogger post,fix xml parsing error blogger,how to fix xml parsing error blogspot,javascript not accepting blogger template

Rate This Article

Thanks for reading: [Solved] Blogger Not Accepting Javascript / Error Parsing XML, Stay tune to get latest Blogging Tips.

Getting Info...

Post a Comment

Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.