2007/9/9, Thomas Broyer:
> 2007/9/8, Jacques Distler:
> >
> > It turns out that this is easily fixed by the following change in
> > tokenizer.rb:
> >
> > # This method replaces the need for
> > "entityInAttributeValueState".
> > def process_entity_in_attribute
> > - entity = consume_entity(true)
> > + entity = consume_entity()
> > if entity
> > @current_token[:data][-1][1] += entity
> >
> > If I make this change, all tests (not just the sanitizer tests) pass.
>
> If I make the exact same change in the python version, the three
> "entity in attribute" tests in tests1.test fail.
>
> This means (to me) there is a bug in the ruby port of consume_entity.
>
> Now, let's try to find out which and where ;-)
The ruby version reads:
if entityName[-1] != ?;
@token_queue << {:type => :ParseError, :data =>
"named-entity-without-semicolon"}
end
I don't know ruby enough but that "!= ?" construct seems strange...
but it cannot be causing the bug.
the line after, the python version reads "if entityName[-1] != ';'"
while the ruby version reads "if char_stack[-1] ! ";""; could the bug
be here? That's the only difference I can see.
I don't have a ruby install to test this change, so I won't commit it.
And there's still the problem with the sanitizer...
--
Thomas Broyer
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"html5lib-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/html5lib-discuss?hl=en-GB
-~----------~----~----~----~------~----~------~--~---