Menu

#68 sgml filter bug

closed-fixed
None
5
2003-10-23
2003-10-18
bulia byak
No

aspell fails to check this test file when run with
--mode=sgml:

<aaa bbb=".a.a">
Misspelledd
</aaa>

It just does nothing and returns zero error status.
However, if you remove any of the 4 characters in the
attribute value or change any of the two dots to some
other character, it works. I tried to find the problem
in filter/sgml.cpp but it seems correct - very strange.
So I just changed it so that in_quote is always 0, and
now the bug is gone (although I've also lost the
possibility to spell check alt attributes). Someone
who's a better programmer than I please fix this weird
bug properly.

Discussion

  • Kevin Atkinson

    Kevin Atkinson - 2003-10-18

    Logged In: YES
    user_id=6591

    It not the sgml filter, but the url filter which is
    incorrectly thinking ' "".a.a ' is a url. Thus the sgml
    filter only sees <aaa bbb="> so it thinks the rest of the
    document is still part of bbb= and is thus ignored.

    The attached patch contains a reworked url filter.

     
  • Kevin Atkinson

    Kevin Atkinson - 2003-10-18
    • assigned_to: nobody --> kevina
    • status: open --> open-fixed
     
  • bulia byak

    bulia byak - 2003-10-20

    Logged In: YES
    user_id=741217

    Thanks for speedy response! But I don't see any attachment here?

     
  • Kevin Atkinson

    Kevin Atkinson - 2003-10-20

    Logged In: YES
    user_id=6591

    Sorry, It should be attached now.

     
  • Kevin Atkinson

    Kevin Atkinson - 2003-10-20
     
  • bulia byak

    bulia byak - 2003-10-23

    Logged In: YES
    user_id=741217

    Thanks, it works. But another thing occurred to me: normally
    you parse an XML document first, and then process the data
    in its attributes and text. So is there any special reason
    why the url filter comes before sgml? Reversing that would
    be much more logical.

     
  • Kevin Atkinson

    Kevin Atkinson - 2003-10-23

    Logged In: YES
    user_id=6591

    Yes your right. The url filter is suppose to come last. It
    is set up that way. It not loaded after due to another bug
    which is already fixed in Aspell 0.51. I may backport the
    fix for Aspell 0.50.5

     
  • Kevin Atkinson

    Kevin Atkinson - 2003-10-23
    • status: open-fixed --> closed-fixed