adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
531 stars 128 forks source link

parsing quoted href links does not working, if equal sign is surrounded by spaces. #165

Closed Sandman83 closed 6 years ago

Sandman83 commented 6 years ago

Copied from forum: string html = get(page, client).text; auto document = new Document(); document.parseGarbage(html); Element attEle = document.querySelector("span[id=link2]"); Element aEle = attEle.querySelector("a"); string link = aEle.href; // <-- if the href contains space, it return "href" rather the link

let's say the page HTML look like this:

Hello, dear world! G!

See also https://forum.dlang.org/post/eznreimgzchrwggxtzls@forum.dlang.org