b1f6c62b25
For instance, jsdom's more spec-compliant parsing causes issues with auto-closing elements (lifehacker article) and with not having self-closing <img> and <br> tags. The former was fixed by removing offending markup, the latter by adjusting JSDOMParser to be more sane, and the expected outputs to cope with this. Finally, JSDOMParser automatically drops comments. The test code needed to manually do this in the jsdom case.
38 lines
2.0 KiB
HTML
38 lines
2.0 KiB
HTML
<div id="readability-page-1" class="page">
|
|
<article>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
|
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
|
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
|
|
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<h2>Videos</h2>
|
|
|
|
<p>At root</p>
|
|
<iframe width="560" height="315" src="https://www.youtube.com/embed/LtOGa5M8AuU"
|
|
frameborder="0" allowfullscreen=""></iframe>
|
|
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/LtOGa5M8AuU"
|
|
frameborder="0" allowfullscreen=""></iframe>
|
|
<iframe src="https://player.vimeo.com/video/32246206?color=ffffff&title=0&byline=0&portrait=0"
|
|
width="500" height="281" frameborder="0" webkitallowfullscreen="" mozallowfullscreen=""
|
|
allowfullscreen=""></iframe>
|
|
<p>In a paragraph</p>
|
|
<p>
|
|
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/LtOGa5M8AuU"
|
|
frameborder="0" allowfullscreen=""></iframe>
|
|
</p>
|
|
<p>In a div</p>
|
|
<p>
|
|
<iframe width="560" height="315" src="https://www.youtube.com/embed/LtOGa5M8AuU"
|
|
frameborder="0" allowfullscreen=""></iframe>
|
|
</p>
|
|
<h2>Foo</h2>
|
|
|
|
<p>Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
|
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
|
|
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
</article>
|
|
</div>
|