JavaScript замените Doublequote на пустую строку
const anyStr = 'Friend ... "OK" ... foo'
const formattedString = anyStr.replace(/["]/g, "\\"")
Magnificent Magpie
const anyStr = 'Friend ... "OK" ... foo'
const formattedString = anyStr.replace(/["]/g, "\\"")