Menu

#88 entity handling is broken

closed-fixed
nobody
main code (54)
5
2012-01-14
2011-12-30
No

xmlstarlet 1.3.0 is broken when handing entities, making it unusable on files with entities.

With the attached files:

$ xmlstarlet sel -t -c //test external-pe.xml
<test>&entity;</test>
$ xmlstarlet sel -t -v //test external-pe.xml

bar

$ xmlstarlet sel -t -c //foo external-pe.xml
zsh: exit 1 xmlstarlet sel -t -c //foo external-pe.xml
$ xmlstarlet sel -t -v //foo external-pe.xml
zsh: exit 1 xmlstarlet sel -t -v //foo external-pe.xml
$

Only the second command is correct.

Version 1.0.2-1 behaved correctly on all commands:

$ xmlstarlet sel -t -c //test external-pe.xml
<test>
<foo>bar</foo>
</test>
$ xmlstarlet sel -t -v //test external-pe.xml

bar

$ xmlstarlet sel -t -c //foo external-pe.xml
<foo>bar</foo>
$ xmlstarlet sel -t -v //foo external-pe.xml
bar
$

I've also reported this bug in the Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653666

Discussion

  • Vincent Lefevre

    Vincent Lefevre - 2011-12-30

    testcase

     
  • Noam Postavsky

    Noam Postavsky - 2011-12-31

    I introduced this bug in 1.1.0 (5895befb8d2), when I moved to xmlReadFile instead of xmlParseFile.

    Now fixed in a78969078883050584a4f10a873de7295c6c95d7

     
  • Noam Postavsky

    Noam Postavsky - 2011-12-31
    • status: open --> open-fixed
     
  • Noam Postavsky

    Noam Postavsky - 2012-01-14
    • status: open-fixed --> closed-fixed
     
  • Noam Postavsky

    Noam Postavsky - 2012-01-14

    Fixed in release 1.3.1

     

Log in to post a comment.

Auth0 Logo