Hello All, I am getting issue with xml parsing fo...
# general
g
Hello All, I am getting issue with xml parsing for ‘&’ while passing parameters to suitelet,. So I tried like - var xmlEscapedDocument = xml.escape({xmlText : xml}); context.response.renderPdf({xmlString: xmlEscapedDocument}); Its printing the pdf but giving error like escape cannot be found in an object Can anyone help ?
b
it looks like you have variable shadowing
beyond that, for escaping purposes, you can use freemarker's escape mechanisms
or you can escape your data before rendering, though you usually wouldnt want to escape your entire xml string
you would only want to escape your parameters
g
How I can escape only parameters since currently i am escaping entire xml string
b
depends on how the xml string is built
g
Okay , its html code that i wanted to print as pdf on button click
b
still not enough to help you out
whatever is generating your xml is not doing it correctly
so whatever that is needs to be fixed
g
Thanks @battk , I will try to resolve it else will share my code here 🙂