seandenigris/Soup-for-Pharo

SoupParser does not handle uppercase closing tags correctly

Opened this issue · 0 comments

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.