Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14555

XWIKI allows pages to contain invalid characters () but bails out on history

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • 5.1, 8.4.5
    • None
    • None
    • Unknown

    Description

      Similiar to issue XWIKI-8995 I've got problems accessing historical versions of a page. The current version displays fine.

      Analysis (e.g. catalina.out) shows errors like

      • ''Exception while reading version [xxx.x] for document id [x,x,x,x,x,x]"
      • "Caused by: com.xpn.xwiki.XWikiException: Error number 2002 in 2: Error parsing xml"
      • "Caused by: org.dom4j.DocumentException: Error on line 255 of document : Character reference "&#1" is an invalid XML character. Nested exception: Character reference "&#1" is an invalid XML character."

      Analysis shows, that for some unknown reason an invalid character (, viewable on edit) has been entered (may be some cut and paste-error) and saved rendering this and all versions after it unable to properly display in history (regardless of difference or page-view).

      Thus I file a bug as saving invalid contend should be disallowed. If the contend were to be allowed it should display properly in history, too.

      I fixed the issue within the database with a statement like
      update xwikircs set xwr_patch=replace(xwr_patch, "", "") where xwr_patch like '%&#1%';

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              GDA Markus Greger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: