[Scamper] Bug in reading empty tags.

Frank Shearar squeak-dev at lists.squeakfoundation.org
Thu Sep 12 09:30:49 UTC 2002


Hi all

If you peruse http://vorice.angband.za.org you'll see that the FrontPage link is "/> FrontPage" instead of "FrontPage".

This is because, as far as I can see, HtmlTokenizer>>nextTag (is this the correct representation?) is not processing the empty tag immediately before the anchor tag.

The relevant snippet of the XHTML source for that page is

<link rel="stylesheet" type="text/css" ref="http://vorice.angband.za.org//stylesheets/wiki.css" />
<title>FrontPage</title>

and what it looks like what's happening is that HtmlTokenizer is returning prematurely & not processing the " />" bit of the tag. You can see further down the page, by the EditLinks link and just after the footer of the page similar "mistokenisings".

According to the XHTML spec, this space is legal and, in fact, recommended for backwards compatibility reasons.

At any rate, the fix should be simple - after reading the attributes one should

  self skipSpaces.

  self peekChar = $/ ifTrue: [ negated := true ].

before continuing.

I'd submit a ChangeSet & all that, but I'm very new to Squeak/Smalltalk and I've not gotten around to figuring out how all that works.

frank

PS. My apologies for double-posting my first post (re Symbian & Squeak). <blush />



More information about the Squeak-dev mailing list