-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve HTMLParser attribute processing regexps #38664
Comments
HTML examples seen in the wild that cause parse errors <a width="100%"cellspacing=0> <a foo=> <a href=javascript:popup('/popup/html.html')> My patch contains improvements to the 'attrfind' and The existing test_htmlparser.py unit test continues to I commented out that case and added new test cases to |
Logged In: YES Base version for HTMLParser.py is 1.11.2.1; base version for |
Logged In: YES This also fixes bugs 683938 and 699079. |
Logged In: YES This patch allows developers to override the behavior of HTMLParser It does not change the default behavior of HTMLParser and so presents The patch itself consists of an added comment and two added lines of The library documentation could be updated to reflect the ability to http://issola.caltech.edu/~t/transfer/HTMLParser-doc-error.patch More problems exist with markupbase.py, upon which HTMLParser is Comments in 683938 and 699079 suggest that raising an exception is the An alternative would be to distinguish between unrecoverable errors If nothing done, at least close patch 755660 and bug 736428 with a |
Logged In: YES whoops, attached to wrong patch! dangitall. sorry... |
Logged In: YES I don't think HTMLParser should parse clearly invalid HTML without Patch 699079, to "fix" similar behavior, was closed by adsr and bcannon Recommend closing patch w/o applying. |
I for one thank smroid for the patch. I also have hit *all* of these |
There are messages both for and against the patch which contains a unit test. Can we have a statement from a knowledgeable HTML person as to whether the patch should be accepted or rejected. |
Attached patch includes the tests in diff.txt. On Python 3, with strict=False, the first test (adjacent attributes) passes, but the other two still fail. |
New changeset 3c3009f63700 by Ezio Melotti in branch '2.7': New changeset 16ed15ff0d7c by Ezio Melotti in branch '3.2': New changeset 426f7a2b1826 by Ezio Melotti in branch 'default': |
Fixed, thanks for the report! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: