Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

SoupParser does not handle uppercase closing tags correctly #2

Open
swinkels opened this issue Aug 7, 2017 · 0 comments
Open

SoupParser does not handle uppercase closing tags correctly #2

swinkels opened this issue Aug 7, 2017 · 0 comments

Comments

@swinkels
Copy link

swinkels commented Aug 7, 2017

Method SoupParser>>parseStartTag converts the tag that it read to lowercase. Method SoupParser>>handleEndTag does not do this, which causes SoupParser>>numPops to not find the opening tag in the tagStack.

If you need an example, the following snippet does not parse the HTML page correctly:

page := ZnClient new get: 'http://elib.zib.de/pub/mp-testdata/tsp/tsplib/tsp/index.html'.
"uncomment the following line to correctly parse the page"
"page := page asLowercase." 
soup := Soup fromString: page.

Usually I would make a pull request for this, but (1) I am relatively new to Smalltalk and (2) I have never worked with the Pharo GitHub integration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant