Recommendable stuff...

Monday, March 12, 2007

Posting source code / html in Blogger

Bummer, i tried to post some source code in blogger and it went haywire. I thought it was as easy as cutting and pasting. but noo! it 'parsed' my html and tried to run my script and display my <form>.

Well, the crucial step is to replace all the ampersands and 'greater/less than' signs to their html equivalent. It basically accomplished in three steps.

  1. Change the & to "& amp ;" (without the space) in your code snippet.
  2. Change the "<" to "& lt ;" (without the space)
  3. Change the ">" to "& gt;") (without the space)

Now cut and paste it into your blog editor.

Alternatively, head on Centricle and let their conversion tool do it for you.

0 ppl said stuff:

Get the new version of Firefox!