make all apostrophe in string curled javascript code example
Example: javascript replace ios apostrophe
//replace all ios/iphoneX weirdness ie:’‘”“ em dashes and ellipses
str = str.replace("”", '"').replace("“", '"').replace("’","'").replace("‘","'").replace(/[\u2018\u2019]/g, "'").replace(/[\u201C\u201D]/g, '"').replace(/[\u2013\u2014]/g, '-').replace(/[\u2026]/g, '...');