testlink_parser.py 文件源码

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

项目:xmind2testlink 作者: tobyqin 项目源码 文件源码
def set_text(element, content):
    content = escape(content, entities={'\r\n': '<br />'})  # retain html tags in text
    content = content.replace("\n", "<br />")  # replace new line for *nix system
    content = content.replace("<br />", "<br />\n")  # add the line break in source to make it readable

    # trick to add CDATA for element tree lib
    element.append(Comment(' --><![CDATA[' + content.replace(']]>', ']]]]><![CDATA[>') + ']]><!-- '))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号