DOM002 Illegal Character Exception Occured For A User

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 org.w3c.dom.DOMException: DOM002 Illegal character at org.apache.xerces.dom.CoreDocumentImpl.createAttribute(Unknown Source) Stack Trace: [hide] org.w3c.dom.DOMException: DOM002 Illegal character at org.apache.xerces.dom.CoreDocumentImpl.createAttribute(Unknown Source) at org.apache.html.dom.HTMLDocumentImpl.createAttribute(Unknown Source) at org.apache.xerces.dom.ElementImpl.setAttribute(Unknown Source) at org.cyberneko.html.parsers.DOMFragmentParser.startElement(DOMFragmentParser.java:431) at org.cyberneko.html.filters.DefaultFilter.startElement(DefaultFilter.java:179) at org.cyberneko.html.filters.NamespaceBinder.startElement(NamespaceBinder.java:286) at org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:1009) at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:639)

Cause

Some unrecognized characters from HTML pages are being copied over to Confluence causing the wiki renderer to generate the exception above.

Resolution

Use the correct macro to display the format as displayed from the HTML pages and prevent a direct copy as some characters/format are not being recognized.

An alternative is to display the HTML page via the HTML macro plugin.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.