Bug #304
closedampersand handling errors
0%
Description
Reported by Christy Bowles:
"Error in adding new packages (after complete package wizard and close package
editor):Org.xml.sax.SAXParseException. The entity name must immediately follow
the ?&? in the entity of reference."
"Can?t download files from Metacat (I could earlier today). I tried this several
times and nothing happened. Several later attempts generated the error
message:Org.xml.sax.SAXParseException. The entity name must immediately follow
the "&" in the entity of reference. Another attempt froze the program."
Updated by Matt Jones about 23 years ago
"&" is a special character in XML and it looks like we're not escaping them
properly. Not sure what parts of Morpho experience this issue. I'm pretty
sure metacat translates "&" to "&" before sending a doc, but we'll need to
check that too.
Updated by Dan Higgins about 23 years ago
XML editor already had a 'normalize' method that converted special text
characters such as '&' to entity notation (i.e. $amp;) but the PackageWizard did
not make such conversion. In fact, entering an '&' in the PackageWizard caused
the final screen to be 'blank' (an often observed error which was previously
unexplained).
Added 'normalize' method to PackageWizard class to contvert text when new xml
docs are created.