#68 QuotedString does not escape escape character

v1.0 (example)
pending-fixed
nobody
None
5
2014-05-07
2013-08-04
No

It should be possible to get any string as the parsed value of QuotedString. In pyparsing 1.5.7 it is not possible to get, as parsed value, the string '\\"' where '\\' is the escape character and '"' is the quoting character.

More concretely, I would expect the following to print \". However, it prints \\":

from pyparsing import QuotedString
quotedString = QuotedString(quoteChar='"', escChar='\\')
print quotedString.parseString(r'"\\\""')[0]

To fix this, QuotedString should unescape the substring of twice the escaping character.

Discussion

  • Paul McGuire

    Paul McGuire - 2014-05-07

    Fix has been made and checked into SVN, will ship in 2.0.3 release

     
  • Paul McGuire

    Paul McGuire - 2014-05-07
    • status: open --> pending-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks