Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Handle special characters in xml


Level 5


  Our end users tend to copy the description text from Word documents to pdf form and submits it.

If that text contains any special characters, its getting carried to the extracted xml. In the next step, when I try to assign a task to user with template and this xml, Managers cannot able to open the form and showing the error. When I assign the xml without special characters, its running fine.


Please assist on how to handle this?

My expectation is that user should be prompted in the form when he pastes any special characters or they should be auto-corrected to null values. if that is not possible, atleast we should able to filter the xml and eliminate special characters before the form go to next stage.

Appreciate your help.



5 Replies


Level 8

Are the fields rich text fields or plain text?


Level 5

My apologies for the delayed response. I'm using the default text fields we find in Library. Not sure how to find if it accepts rich or plain text.

Any help appreciated.



Level 8

On the field pallete there is a Field Format dropdown, by default its Plain Text Only change it to Rich Text


Level 5

Hi Steve,

  Thanks for that. Do you mean changing this would solve the problem of rendering form?


Not applicable

In first instance, I would have followed this way:

so, I would have parsed the submitted text in a Validate event and changed any special chars to UTF-8 numeric reference.

However, I found this:

which seems to state that not all UTF-8 characters are possible in XML.

In fact, those allowed are listed here:

so, I would still use a Validate event script but based on the XML specs' Character Range. Exactly as Mark McLaren did in Java.

This will permit to keep those special chars that are allowed. Your Managers will thank you.

Hope it helps.