JIRA 3.1 and above should not suffer from this problem. Invalid characters are automatically stripped from imported data |
In older versions of JIRA it was possible to cut & paste text containing control characters into JIRA issue fields. This causes problems, because JIRA's backup format is XML, and XML does not allow for the storage of most control characters . When XML containing control characters is imported into JIRA, the import fails with an error:

To fix this, one needs to remove the control characters from the JIRA backup file. This can be done as follows:
- Download atlassian-xml-cleaner-0.1.jar
- Open a command prompt and locate the XML or ZIP backup file on your computer, here assumed to be called jiradata.xml
- Run:
This will write a copy of jiradata.xml to jiradata-clean.xml, with invalid characters removed. You should now be able to import jiradata-clean.xml without problems.
java -jar atlassian-xml-cleaner-0.1.jar jiradata.xml > jiradata-clean.xml







1 Comment
Hide/Show CommentsDec 19, 2011
Jeff Turner
This XML cleaner doesn't strip <ffff> characters. If, after running this XML cleaner you may still get the error:
An invalid XML character (Unicode: 0xffff) was found in the CDATA section.
On my system I was able to fix this with:
perl -i -pe 's/\xef\xbf\xbf//g' entities.xml
Note perl doesn't allow \x{FFFF} in regexps so you have to break it into bytes as above.
Add Comment