7px
03/13/2023, 4:45 AMescape()
function doesn't seem to return a string that escapes apostrophes. It's managed to escape everything else, including ampersands'.
for context i'm rendering a pdf using Render.xmlToPdf()
. If it helps, the xml isn't loaded from File Cabinet, but rather hard-coded onto the script itself as a string via backticks, and the values added through placeholders.battk
03/13/2023, 5:09 AMrequire(['N/xml'], function(xml) {
log.debug(xml.escape({xmlText: '\''}))
})
works as expectedbattk
03/13/2023, 5:11 AM7px
03/14/2023, 7:31 AM