Why are regular expressions taking the helm in my JavaScript, and how do I insist “this is a string”? [closed]

<a href=\"/pain\/">

The second double quote isn’t escaped. \" not /".

It would probably be more reliable to store these quotes in a plain text file or database, and escape them automatically. Escaping a lot of text by hand is a chore.

Leave a Comment