Article - CS293387

ChangeSimpleToRichTextUtility is incorrectly escaping special characters and thus fails to convert certain objects in Windchill PDMLink

Modified: 06-Nov-2020   


Applies To

  • Windchill PDMLink 11.1

Description

  • ChangeSimpleToRichTextUtility is erroring out on a few specific objects
  • ChangeSimpleToRichTextUtility fails with reference to frac12 and frac14
  • ChangeSimpleToRichTextUtility is incorrectly escaping special characters
  • The Method Server logs show the following errors:
    • [DATE_TIME] ERROR [RMI TCP Connection(647)-[IP]] com.ptc.core.richtext.HTMLText wtadmin - net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 171; The entity "frac14" was referenced, but not declared.
    • [DATE_TIME] ERROR [RMI TCP Connection(647)-[IP]] com.ptc.core.richtext.HTMLText wtadmin - net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 115; The entity "frac12" was referenced, but not declared.
    • [DATE_TIME] ERROR [RMI TCP Connection(647)-[IP]] com.ptc.core.richtext.HTMLText wtadmin - net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 121; Character reference "&#55349" is an invalid XML character.
    • [DATE_TIME] ERROR [RMI TCP Connection(647)-[IP]] com.ptc.core.richtext.HTMLText wtadmin - net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 66; An invalid XML character (Unicode: 0x1) was found in the element content of the document.
  • The ChangeSimpleToRichTextUtility logs show the following:
    • Message:  Resource bundle/Message key = com.ptc.core.richtext.richTextRB/1
      The text to store as the rich text attribute could not be converted to Windchill format.  
          at com.ptc.core.richtext.HTMLText.setFormattedText(HTMLText.java:370)
          at com.ptc.core.richtext.HTMLText.initialize(HTMLText.java:189)
          at com.ptc.core.richtext.HTMLText.newHTMLText(HTMLText.java:171)
          at wt.change2.converter.richtext.ChangeItemRichTextConverterDelegate.getRichText(ChangeItemRichTextConverterDelegate.java:74)
          at wt.change2.converter.richtext.ChangeTaskRichTextConverterDelegate.convert(ChangeTaskRichTextConverterDelegate.java:58)
          at wt.change2.converter.richtext.ChangeSimpleToRichTextHelper.processChunkResults(ChangeSimpleToRichTextHelper.java:579)
          ...
  • ChangeSimpleToRichTextUtility skips many objects and during conversion below error is logged in Method Server logs:
    • ERROR [RMI TCP Connection(5460)-10.0.5.75] com.ptc.core.richtext.HTMLText wcadmin - net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 120; Character reference "&#11" is an invalid XML character.
      net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 120; Character reference "&#11" is an invalid XML character.

       
This is a printer-friendly version of Article 293387 and may be out of date. For the latest version click CS293387