old blog,

HOWTO: Adding Non-Strict HTML into Blogger Widget Template XML

Izhar Firdaus Izhar Firdaus Follow Support Jan 01, 2007 · 1 min read
HOWTO: Adding Non-Strict HTML into Blogger Widget Template XML
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.
I have been trying to insert some javascript buttons into the Posts widget of the new Blogger engine. There are no predefined widgets provided by Blogger for this purpose, so, I opened the template's HTML to insert it. However, the task that I thought gonna be easy became a frustrating task because the engine requires strict XHTML coding in the template thus making everything a nightmare to pass the syntax checker.

Struggling to insert the code, I discovered that the engine will parse any &lt; and &gt; entries into < and > of the generated code. So , I fire up gedit, paste the code, and do a search and replace for & < and >, replacing them with &amp; &lt; &gt; and pasted the new code into the template. The result is -> Success!! -> look at the stumbleupon button below :)

Linux and BSD users can do this quickly on a text file by using sed.
cat file|sed s/'\&'/'\&amp;'/g|sed s/'<'/'\&lt;'/g|sed s/'>'/'\&gt;'/g
Written by Izhar Firdaus Follow Support
I'm a system architect, data engineer and developer advocate with passion in Free / Open Source software, entrepreneurship, community building, education and martial art. I take enjoyment in bridging and bringing together different FOSS technologies to help businesses and organizations utilize IT infrastructure to aid and optimize their business and organizational process.

Happy New Year 2007!!!

I wish y'all a Happy New Year 2007!!!. I hope this year will be a great year with lots of new things learned. (hopefully next semeste...

In old blog, Jan 01, 2007

« Previous Post

GTalk Online Status Indicator

I beleive lots of us is familiar with Yahoo!'s I'm Online images on websites, blogs, myspace, friendster, etc. Some of us might not p...

In old blog, Jan 01, 2007

Next Post »