jl_arnold Posted July 21, 2016 Share Posted July 21, 2016 I received the following code from my BRM to replace standard quotation marks with Smart Quotes in a form field using the Rich Text Editor. field = field.replace(/(\<)(.+)(\>)/g, function(m,p1,p2,p3){return p1 + p2.replace(/\"/g, "\|") + p3;}); field = field.replace(/"([^"]*)"/g, "“$1”").replace(/(\w)'(\w)/g, "$1’$2").replace(/'([^']*)'/g, "‘$1’"); field = field.replace(/\|/g, "\""); return field; This code works with the Rich Text Editor for single quotes (aposotrophe), but does not work for double quotes. Can someone help fix this to work with double quotes? See the PDF using the link below to see the working single quotes, but not double quotes. https://images.printable.com/imagelibrary/Seller/1061/WebImages_07202016100114_277/images/src/iitsucvy.pdf Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts