You can simply paste the JavaScript/HTML codes in following box, click on 'Convert', then copy the converted codes to use in XML documents (esp. Blogger template).
HTML/Javascript Codes:
If you are using Blogger (blogspot.com)
In Google's Blogger (blogspot.com) platform, sometimes you get following error message (or similar) when trying to add ADsense codes or JavaScript codes (esp. JavaScript codes from 3rd party advertising (AD) company) to the template:
Error parsing XML, line 1205, column 91: The reference to entity "u" must end with the ';' delimiter.
I have talked about this issue in previous post . Why it happens is because Blogger template is using XML standard, which requires that, you can not use 5 special characters directly in the HTML/JavaScript codes, you have to use their entities' name.
I listed 2 ways to fix the problem. The first way is, replace the 5 special characters with their entities' name manually- which will take time if you get some long codes.
That's why I provide the above tool- to do the replacement automatically.
Reference
The 5 special characters:
' need to be replaced with '
" need to be replaced with "
& need to be replaced with &
< need to be replaced with <
> need to be replaced with >
Wikipedia reference here.