#8 Tag attribs with no rval not parsed correctly

closed
nobody
None
5
2004-04-17
2004-03-17
Anonymous
No

When the parser encounters a tag attribute with no
right value ('=VALUE'), it assumed the end of the tag
had been reached.

To fix it, I pulled out the skipBlanksInTag()
conditional and put it before the loop, and at the
end of the right-value conditional. And I added a
different conditional in its place:
$this->iCurrentChar == ">"
This checks to see if the end of tag has been reached.

So that:

$this->skipBlanksInTag();
while ( $this->iCurrentChar != ">" ) {
$attrName = $this->skipToBlanksOrEqualsInTag();
if ($attrName != "") {
$this->skipBlanksInTag();
if ($this->iCurrentChar == "=") {
$this->skipEqualsInTag();
$this->skipBlanksInTag();
$value = $this->readValueInTag();

$this->iNodeAttributes[strtolower($attrName)] = $value;
$this->skipBlanksInTag();
}
else {

$this->iNodeAttributes[strtolower($attrName)] = NULL;
}
}
}

Discussion

  • Logged In: YES
    user_id=187608

    Forgot to login. I submitted this (moxley)

     
  • Jose Solorzano
    Jose Solorzano
    2004-04-13

    Logged In: YES
    user_id=33204

    fixed in CVS.

     
  • Jose Solorzano
    Jose Solorzano
    2004-04-17

    • status: open --> closed