cobrateam / cobrateam/splinter

There should be an option to use html5lib instead of lxml.html in DjangoClient (chokes on some html5 input)

Open
#441 2 comments 0 reactions 0 assignees View on GitHub
brainstorm on hold
Dominant language
Python
Stars
2.7k
Forks
511
PR merge metrics
No merged PRs in 30d

Description

It looks like libxml2's html parsing doesn't produce a proper html5 DOM and sometimes chokes on valid html5 even when run in tolerant mode which can result in errors like "XMLSyntaxError: ... Tag footer invalid". The solution is probably to allow the usage of html5lib instead. One hitch with this is the methods from HTMLMixin no longer exist, so the dependence on these should be removed from Splinter.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating DjangoClient and its use of HTMLMixin, then trace how parsed HTML is consumed. Add an option for html5lib parsing, remove the dependence on HTMLMixin methods, and verify that valid HTML5 such as footer elements no longer causes parsing errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.