mod_pbxproj.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:qt-xcodeproj-embeded-frameworks 作者: lukevear 项目源码 文件源码
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("<", "&lt;")        # escape '<'
    text = text.replace(">", "&gt;")        # escape '>'
    return text.encode("ascii", "xmlcharrefreplace")  # encode as ascii with xml character references
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号