I guess my question is naive. But I ask anyway, as I don't find a good webpage for answering it.
Suppose I run the above code in the browser, I will get the following in the html. Does anybody know how to print an option/function in html? The result must be human readable (meaning with proper indentation).
good eyes, jalarie. Now it works on IE, FF, Chrome and Opera. I can't help but think there must be some more efficient, regexy way of doing this, rather than replacing string characters on a case by case basis, though...
good eyes, jalarie. Now it works on IE, FF, Chrome and Opera. I can't help but think there must be some more efficient, regexy way of doing this, rather than replacing string characters on a case by case basis, though...
Yes. I would like a more general API (probably just one simple function call to hide all the details) that can do the conversion correctly for all cases so that I don't have to worry what special characters to replace.
Bookmarks