py_ext/PythonFileCTNMixin.py
changeset 2439 f0a040f1de1b
parent 2434 07f48018b6f5
child 2442 b13f021c68a5
equal deleted inserted replaced
2438:0f2e5303f212 2439:f0a040f1de1b
    61 
    61 
    62             pythonfile_xml = pythonfile_xml.replace(
    62             pythonfile_xml = pythonfile_xml.replace(
    63                 'xmlns="http://www.w3.org/2001/XMLSchema"',
    63                 'xmlns="http://www.w3.org/2001/XMLSchema"',
    64                 'xmlns:xhtml="http://www.w3.org/1999/xhtml"')
    64                 'xmlns:xhtml="http://www.w3.org/1999/xhtml"')
    65             for cre, repl in [
    65             for cre, repl in [
    66                     (re.compile("(?<!<xhtml:p>)(?:<!\[CDATA\[)"), "<xhtml:p><![CDATA["),
    66                     (re.compile(r"(?<!<xhtml:p>)(?:<!\[CDATA\[)"), "<xhtml:p><![CDATA["),
    67                     (re.compile("(?:]]>)(?!</xhtml:p>)"), "]]></xhtml:p>")]:
    67                     (re.compile(r"(?:]]>)(?!</xhtml:p>)"), "]]></xhtml:p>")]:
    68                 pythonfile_xml = cre.sub(repl, pythonfile_xml)
    68                 pythonfile_xml = cre.sub(repl, pythonfile_xml)
    69 
    69 
    70             try:
    70             try:
    71                 python_code, error = PythonParser.LoadXMLString(pythonfile_xml)
    71                 python_code, error = PythonParser.LoadXMLString(pythonfile_xml)
    72                 if error is None:
    72                 if error is None: