-
Notifications
You must be signed in to change notification settings - Fork 607
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
Uncaught DOMException on https://losst.ru/obnovlenie-debian-9 #392
Comments
Can you provide more detailed STR? If I open the page in Firefox and enter reader mode, it works. What are you doing differently? |
I am porting this to Chrome. To regenerate you can follow this
var loc = document.location;
var uri = {
spec: loc.href,
host: loc.host,
prePath: loc.protocol + '//' + loc.host,
scheme: loc.protocol.substr(0, loc.protocol.indexOf(':')),
pathBase: loc.protocol + '//' + loc.host + loc.pathname.substr(0, loc.pathname.lastIndexOf('/') + 1)
};
var documentClone = document.cloneNode(true);
var article = new Readability(uri, documentClone).parse();
var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
iframe.contentDocument.open();
iframe.contentDocument.write(article.content);
iframe.contentDocument.close(); which causes:
|
I can no longer reproduce this with the latest version of Readability and Chrome, so I assume this has been fixed since. :-) |
@gijsk I can reproduce the Here are the reproduction steps:
Expected: article being parsed I have a bunch of URLs that can be used to reproduce the above behavior: Apparently it's caused by malformed HTML, but it should not crash the entire readability. |
Well, this is fun... I filed whatwg/html#4275 for the inconsistency between how HTML is parsed and how the DOM APIs validate exactly the same thing. I should have a patch for this using the workaround mentioned there (using |
Yum, and |
OK, so maybe the simpler solution is just to ignore those additional attributes that we can't even set; it's not like we need them for anything... |
OK, so PR is up, as well as issues found in |
I am getting
which refers to
The text was updated successfully, but these errors were encountered: