Giter Club home page Giter Club logo

Comments (8)

FlorianRappl avatar FlorianRappl commented on July 30, 2024

Thanks for the report - I will investigate this issue.

from anglesharp.

FlorianRappl avatar FlorianRappl commented on July 30, 2024

Hm I cannot reproduce this issue. Can you confirm that the following selector gets the element which causes the possible problems: document.QuerySelector("img.img-responsive")?

I pretty much compared AngleSharp's result with the current results delivered by the Blink engine (Opera 28) and both are the same. Am I missing something?

from anglesharp.

corliss avatar corliss commented on July 30, 2024

Yes, that's the one. It has an attribute named documentary." that includes the period, backslash and quote. I'm using the nuget assembly, version 0.7.0.37131. Is that too old?

from anglesharp.

corliss avatar corliss commented on July 30, 2024

I updated the assembly and verified that the same problem occurs with 0.8.1 as well.
Incidentally, I'm reading the file with
var html = File.ReadAllText(filename).
And parsing with an empty Configuration object.

Also: Windows 8.1, .net 4.5.

from anglesharp.

FlorianRappl avatar FlorianRappl commented on July 30, 2024

It's supposed to be like that. So this is not an issue, but rather one of HTML's "features". Please compare to the implementations in all HTML5 conforming browsers.

from anglesharp.

corliss avatar corliss commented on July 30, 2024

Just so I understand, could you explain this a bit more please?

from anglesharp.

FlorianRappl avatar FlorianRappl commented on July 30, 2024

Well, what else is there to say. I could write about tokenization in HTML5 documents, but all you need to know is that the given snippet that is responsible for the image element generation contains a dot and a backslash, which are legal characters in an attribute name. Also quotation marks are allowed. However, quotation marks (among some other characters) are parse errors.

These errors will never result in an exception or anything bad, but are indications that the page might not result in the desired tree.

HTML5 contains a lot of "features" that are included to be as backward compatible (not only with HTML, but also with former HTML error correction which was freely implemented by browser vendors, as there was no official error correction) as possible.

from anglesharp.

corliss avatar corliss commented on July 30, 2024

Understood. Some of my code converts the parsed Html into Xml (i.e. x-html) so I guess I'll have to eliminate tags that are unrecognized.

Great job on compatibility with the standard HTML5 parsing algorithm.

from anglesharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.