Search the JIRA 5.0.x Beta and RCs Documentation:

Index
Downloads (PDF, HTML & XML formats)
Other versions

This documentation relates to JIRA 5.0.x Beta and RCs only.
The latest official version is JIRA 4.4.x
If you are using JIRA 4.4.x either view this page in the JIRA 4.4.x documentation or visit the JIRA 4.4.x documentation home page.
Skip to end of metadata
Go to start of metadata

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:

    java -jar atlassian-xml-cleaner-0.1.jar jiradata.xml > jiradata-clean.xml

    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.
Labels:
  1. Dec 19, 2011

    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.