Hi All,
How to handle the '&' in data, while using the docx from dynamic template.
I am already using the toHtml() and expression rule for escaping xml characters but after that also '&' is converting into '&'
and
if I don't use toHtml() and expression rule for escaping xml characters, then i got the error in dynamic template as"The entity name must immediately follow the '&' in the entity reference.".
Please suggest.
Discussion posts and replies are publicly visible
Try creating an expression rule with following definition keeping "ri!value" as text input and pass your XML in this rule before calling the smart service:
trim( reduce( fn!substitute, ri!value, merge( { "&", "<", ">", char( 34 ), char( 39 ) }, { "&", "<", ">", """, "'" } ) ))
reduce( substitute(_, _, _), ri!text, merge( { "&", "<", ">", """", "'" }, { "&", "<", ">", """, "'" } )),