summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2004-11-12 08:14:49 (GMT)
committerJust van Rossum <just@letterror.com>2004-11-12 08:14:49 (GMT)
commitb84330d3688e2bb380f21587bd7141572ac749d8 (patch)
tree80d59ce02dc2beabe0c25e74411430988a19e328 /Lib
parent26e811abd581fbdf33327dc9704fb03a97d05c1e (diff)
downloadcpython-b84330d3688e2bb380f21587bd7141572ac749d8.zip
cpython-b84330d3688e2bb380f21587bd7141572ac749d8.tar.gz
cpython-b84330d3688e2bb380f21587bd7141572ac749d8.tar.bz2
- \f is not a valid XML character
- reformatted regex pattern, use r"" consistently
Diffstat (limited to 'Lib')
-rw-r--r--Lib/plat-mac/plistlib.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/plat-mac/plistlib.py b/Lib/plat-mac/plistlib.py
index 574b45f..f73214d 100644
--- a/Lib/plat-mac/plistlib.py
+++ b/Lib/plat-mac/plistlib.py
@@ -200,9 +200,10 @@ def _dateToString(d):
)
-# Regex to strip all control chars, but for \t \n \r and \f
-_controlStripper = re.compile(r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0e\x0f"
- "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]")
+# Regex to strip all control chars, but for \t \n and \r
+_controlStripper = re.compile(
+ r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f"
+ r"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]")
def _escapeAndEncode(text):
text = text.replace("\r\n", "\n") # convert DOS line endings