Bug #304
closed
ampersand handling errors
Added by Matt Jones about 23 years ago.
Updated over 22 years ago.
Category:
morpho - general
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."
"&" 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.
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.
Original Bugzilla ID was 304
Also available in: Atom
PDF