def _escapeAndEncode(text):
m = _controlCharPat.search(text)
if m is not None:
raise ValueError("strings can't contains control characters; "
"use plistlib.Data instead")
text = text.replace("\r\n", "\n") # convert DOS line endings
text = text.replace("\r", "\n") # convert Mac line endings
text = text.replace("&", "&") # escape '&'
text = text.replace("<", "<") # escape '<'
text = text.replace(">", ">") # escape '>'
return text.encode("ascii", "xmlcharrefreplace") # encode as ascii with xml character references
mod_pbxproj.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录