Documentation for JIRA 6.3 EAP developer (EAP) releases only. Not using this? See below:
(JIRA 6.2.x documentation | JIRA OnDemand documentation | earlier versions of JIRA)

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, the control characters will need to be removed from the JIRA backup file. This can be done with the following:

  1. Download atlassian-xml-cleaner-0.1.jar
  2. Open a command prompt and locate the XML or ZIP backup file on your computer, ensuring that it is extracted if it's within a ZIP file. In this example, we will use entities.xml.
  3. Run the application with the below:

    $ java -jar atlassian-xml-cleaner-0.1.jar entities.xml > entities-clean.xml

    This will create a copy of entities.xml as entities-clean.xml with the invalid characters removed. 

  4. Copy the entities-clean.xml file into another directory, rename it back to entites.xml and create a new ZIP with and the activeobjects.xml file.
  5. Import the new ZIP file, ensuring that it contains both XML files.
  • No labels


  1. 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.

  2. I also faced that XML cleaner leaves invalid characters in the XML backup. Since it is not developed any further, it won't be fixed. Another method for the cleaning:

    • create the
    • create a test JIRA environment
    • import the into the test JIRA
    • log into the test JIRA, create an again, it will be clean, now you can run the anonymizer

  3. You can Use Notepad++ to clean them out (if file is not too big) using \uffff Search and Replace