This is a follow up question to my question about Setting the CSS of code if it contains a reserved word.
What I am trying to do: If some code has quot
Why split the string up when you can perform a simple global regex find and replace:
Edit: Just updated it to accommodate nested quotes.