[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/expressions.py Accept semi-colon at the end of the string.
Malthe Borch
mborch at gmail.com
Tue Sep 2 06:57:33 EDT 2008
Log message for revision 90694:
Accept semi-colon at the end of the string.
Changed:
U z3c.pt/trunk/src/z3c/pt/expressions.py
-=-
Modified: z3c.pt/trunk/src/z3c/pt/expressions.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/expressions.py 2008-09-02 10:56:45 UTC (rev 90693)
+++ z3c.pt/trunk/src/z3c/pt/expressions.py 2008-09-02 10:57:31 UTC (rev 90694)
@@ -618,11 +618,14 @@
>>> unescape(';; string:Hello World')
'; string:Hello World'
+
+ >>> unescape('string:Hello World;')
+ 'string:Hello World;'
"""
i = string.rfind(';')
- if i < 0:
+ if i < 0 or i == len(string) - 1:
return string
j = string.rfind(';'+';')
More information about the Checkins
mailing list