Removing terrible MS Word ‘smart quotes’ in JS
I just put this on Twitter, but I thought it could use a more permanent home. Eventually, I’ll just add it to Toothpick. For now though, I’m sure someone is struggling with it right now.
const replaceSmartQuotes = str => str.replace(/[\u2018\u2019]/g, "'").replace(/[\u201C\u201D]/g, ‘”’)`
Read other posts