REST APIs generate illegal XML when files contain invalid characters like 0x1b, 0x08

Description

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31
Build Identifier:

When using zanata maven client to push or pull, if one text flow contains Unicode character: 0x1b, resteasy marshalling/unmarshalling will fail. But upload through server UI will not suffer from this problem.

Reproducible: Always

Steps to Reproduce:
1. create a gettext project/version
2. mvn zanataush

Actual Results:
org.jboss.resteasy.plugins.providers.jaxb.JAXBUnmarshalException: javax.xml.bind.UnmarshalException

  • with linked exception:
    [org.xml.sax.SAXParseException; lineNumber: 325; columnNumber: 7; An invalid XML character (Unicode: 0x1b) was found in the element content of the document.]

Expected Results:
push ok

Server resteasy version is different from client.

Environment

None

Status

Assignee

Patrick Huang

Reporter

Patrick Huang

Tested Version/s

None

Priority

Medium
Configure