Menu

#91 Entities in Output Arg Are Inconsistent

closed-invalid
nobody
main code (54)
5
2012-04-26
2012-04-25
Vhati
No

When querying an doc, the linux build interprets xml entities in the output arg, but the windows build escapes them.
-o "{amp}#126;"
On Linux, prints a tilde.
On windows, prints {amp}amp;#126;

Example:
wget -t 1 -T 2 -O - -q "http://freshmeat.net/?format=atom" | xmlstarlet sel -N x="http://www.w3.org/2005/Atom" -t -m "/x:feed/x:entry" -v "x:title" -o "{amp}#126;" -v "x:link/@href" -n

* Replace {amp} above with literal ampersands.

Discussion

  • Noam Postavsky

    Noam Postavsky - 2012-04-25

    Is it possible your Linux box has an older version? What's the output from --version on each box?

     
  • Vhati

    Vhati - 2012-04-25

    > Is it possible your Linux box has an older version?
    Oh. Good call.
    .
    Windows: 1.3.1
    Debian: 1.0.2

    Still, xml-escaping the user-given output arg in 1.3.1 doesn't seem like intended behavior.

     
  • Noam Postavsky

    Noam Postavsky - 2012-04-26
    • status: open --> closed-invalid
     
  • Noam Postavsky

    Noam Postavsky - 2012-04-26

    > Debian: 1.0.2
    Right, -o takes its argument literally since version 1.0.3 (fixing bug #1912978). Note that the escaping is done because sel outputs XML by default, if you are in text mode (-T, or --text) you won't see any escaping.

     

Log in to post a comment.

Auth0 Logo