summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2004-10-26 10:11:00 (GMT)
committerJust van Rossum <just@letterror.com>2004-10-26 10:11:00 (GMT)
commit8b8decea21679ffd9cc7756ab439e1fca958188b (patch)
tree28dd4d1f3a1685c4c8dce4cca9125adf6cc8242e
parent337614993e6f329143e5a68349b62f0a43114ac9 (diff)
downloadcpython-8b8decea21679ffd9cc7756ab439e1fca958188b.zip
cpython-8b8decea21679ffd9cc7756ab439e1fca958188b.tar.gz
cpython-8b8decea21679ffd9cc7756ab439e1fca958188b.tar.bz2
also escape '>', to closer match Apple's plist output
-rw-r--r--Lib/plat-mac/plistlib.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/plat-mac/plistlib.py b/Lib/plat-mac/plistlib.py
index 08ffb17..ffe33e9 100644
--- a/Lib/plat-mac/plistlib.py
+++ b/Lib/plat-mac/plistlib.py
@@ -208,6 +208,7 @@ def _escapeAndEncode(text):
text = text.replace("\r", "\n") # convert Mac line endings
text = text.replace("&", "&amp;") # escape '&'
text = text.replace("<", "&lt;") # escape '<'
+ text = text.replace(">", "&gt;") # escape '>'
text = _controlStripper.sub("?", text) # replace control chars with '?'
return text.encode("utf-8") # encode as UTF-8