A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mail-archive.com/html5lib-discuss@googlegroups.com/msg00532.html below:

parserError "expected-named-closing-tag-but-got-eof" datavars is not a dict

Status: New
Owner: ----

New issue 181 by eric.pro...@gmail.com: parserError "expected-named-closing-tag-but-got-eof" datavars is not a dict
http://code.google.com/p/html5lib/issues/detail?id=181
This code triggers the problem:
<!doctype html>
<title>x</titleff>
</body>

I get an errorName of "expected-named-closing-tag-but-got-eof",
and params field of "title"

The first field resolves to
_(u"Unexpected end of file. Expected end tag (%(name)s)."),

but I'm not given a hash to work with.

Fix:
Index: html5parser.py
===================================================================
--- html5parser.py      (revision 61813)
+++ html5parser.py      (working copy)
@@ -1507,7 +1507,7 @@

     def processEOF(self):
         self.parser.parseError("expected-named-closing-tag-but-got-eof",
-                               self.tree.openElements[-1].name)
+                               {'name': self.tree.openElements[-1].name})
         self.tree.openElements.pop()
         self.parser.phase = self.parser.originalPhase
         self.parser.phase.processEOF()


--
You received this message because you are subscribed to the Google Groups 
"html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
html5lib-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/html5lib-discuss?hl=en-GB.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4