Wednesday, May 20, 2009
How to write HTML / XML / Javascript code within post section as it is
If you wanted to publish some HTML or XML or javascript code withing a post and if you wish it should be visible as it is when it is published then here are some tips for that. From HTML code convert following characters to the relevant escape code as mentioned bellow and in the same order
- Replace all & symbol with &
- Then replace all < with <
- Replace all > with >
- Now replace all " with "
<a href="http://jokes-tejash.blogspot.com" > Latest Jokes </a>
Then you should convert it to
&alt;a href="http://jokes-tejash.blogspot.com" > Latest Jokes </a>
No comments yet