Changeset 259 for trunk/markup/input.py
- Timestamp:
- Aug 29, 2006, 6:34:40 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/markup/input.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/markup/input.py
r257 r259 81 81 parser.ProcessingInstructionHandler = self._handle_pi 82 82 parser.CommentHandler = self._handle_comment 83 84 # Tell Expat that we'll handle non-XML entities ourselves 85 # (in _handle_other) 83 86 parser.DefaultHandler = self._handle_other 87 parser.UseForeignDTD() 84 88 85 89 # Location reporting is only support in Python >= 2.4 … … 185 189 self._enqueue(TEXT, text) 186 190 except KeyError: 187 lineno, offset = self._getpos() 188 raise expat.error("undefined entity %s: line %d, column %d" % 189 (text, lineno, offset)) 191 filename, lineno, offset = self._getpos() 192 error = expat.error('undefined entity "%s": line %d, column %d' 193 % (text, lineno, offset)) 194 error.code = expat.errors.XML_ERROR_UNDEFINED_ENTITY 195 error.lineno = lineno 196 error.offset = offset 197 raise error 190 198 191 199
Note: See TracChangeset
for help on using the changeset viewer.
