BirkhoffLee@tg says to YSITD
code = code.trim().replace(\"\g, '\\"');