Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(4) | Call(2) | Derive(0) | Import(2)
Converts xmlentities to htmlentities
def xml2htmlentities(string): """ Converts xmlentities to htmlentities """ xpr = re.compile('(\d{1,5});') def substitute_entity(match): ent = int(match.group(1)) if ent in cp2n.keys(): return '&%s;' % cp2n[ent] else: return match.group(0) return xpr.subn(substitute_entity, string)[0]
from ftw.pdfgenerator.utils import encode_htmlentities from ftw.pdfgenerator.utils import html2xmlentities from ftw.pdfgenerator.utils import xml2htmlentities from xml.dom import minidom from xml.parsers.expat import ExpatError
except TypeError: pass return xml2htmlentities(html) def create_table_element(self):
src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/html2latex/converter.py ftw.pdfgenerator(Download)
from ftw.pdfgenerator.html2latex.subconverters import textformatting from ftw.pdfgenerator.utils import encode_htmlentities from ftw.pdfgenerator.utils import xml2htmlentities from random import choice from zope.component import adapts
# we do not use xmlentities, but htmlentities self.html = xml2htmlentities(html) # trim ?