I\'m writing a Chrome extension that involves doing a lot of the following job: sanitizing strings that might contain HTML tags, by converting
I'm not entirely sure about speed, but if you are looking for simplicity I would suggest using the lodash/underscore escape function.