py_ext/PythonFileCTNMixin.py
changeset 1766 c1e5b9f19483
parent 1764 d5df428640ff
child 1768 691083b5682a
equal deleted inserted replaced
1765:ccf59c1f0b45 1766:c1e5b9f19483
    59 
    59 
    60             pythonfile_xml = pythonfile_xml.replace(
    60             pythonfile_xml = pythonfile_xml.replace(
    61                 'xmlns="http://www.w3.org/2001/XMLSchema"',
    61                 'xmlns="http://www.w3.org/2001/XMLSchema"',
    62                 'xmlns:xhtml="http://www.w3.org/1999/xhtml"')
    62                 'xmlns:xhtml="http://www.w3.org/1999/xhtml"')
    63             for cre, repl in [
    63             for cre, repl in [
    64                 (re.compile("(?<!<xhtml:p>)(?:<!\[CDATA\[)"), "<xhtml:p><![CDATA["),
    64                     (re.compile("(?<!<xhtml:p>)(?:<!\[CDATA\[)"), "<xhtml:p><![CDATA["),
    65                 (re.compile("(?:]]>)(?!</xhtml:p>)"), "]]></xhtml:p>")]:
    65                     (re.compile("(?:]]>)(?!</xhtml:p>)"), "]]></xhtml:p>")]:
    66                 pythonfile_xml = cre.sub(repl, pythonfile_xml)
    66                 pythonfile_xml = cre.sub(repl, pythonfile_xml)
    67 
    67 
    68             try:
    68             try:
    69                 python_code, error = PythonParser.LoadXMLString(pythonfile_xml)
    69                 python_code, error = PythonParser.LoadXMLString(pythonfile_xml)
    70                 if error is None:
    70                 if error is None: