/[opental]/opental/pax/htmlpaxparser.py
ViewVC logotype

Diff of /opental/pax/htmlpaxparser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by lalo, Thu Feb 20 10:41:18 2003 UTC revision 1.20 by lalo, Fri Feb 21 18:37:05 2003 UTC
# Line 30  class Raw_HTML_Element(core.Element): Line 30  class Raw_HTML_Element(core.Element):
30          return u'>' + u''.join(self) + u'</' + prefix + self.name + u'>'          return u'>' + u''.join(self) + u'</' + prefix + self.name + u'>'
31    
32  class _parse_in_progress(_text_parse):  class _parse_in_progress(_text_parse):
33        def __init__(self, *a, **kw):
34            _text_parse.__init__(self, *a, **kw)
35            if hasattr(self._module, 'Broken_HTML_Element'):
36                self._broken = self._module.Broken_HTML_Element
37            else:
38                self._broken = Broken_HTML_Element
39            if hasattr(self._module, 'Raw_HTML_Element'):
40                self._raw = self._module.Raw_HTML_Element
41            else:
42                self._raw = Raw_HTML_Element
43    
44      def handle_starttag(self, rawname, raw_attributes):      def handle_starttag(self, rawname, raw_attributes):
45          _text_parse.handle_starttag(self, rawname, raw_attributes)          _text_parse.handle_starttag(self, rawname, raw_attributes)
46          element = self.stack[-1]          element = self.stack[-1]
47          if element.name in broken:          if element.name in broken:
48              element.__class__ = Broken_HTML_Element              element = element.copy(self._broken)
49          if element.name in raw:          elif element.name in raw:
50              element.__class__ = Raw_HTML_Element              element = element.copy(self._raw)
51            else:
52                return
53            self.stack[-1] = element
54    
55  def parse(data, builtin_namespaces=None, encoding=None, module=core):  def parse(data, builtin_namespaces=None, encoding=None, module=core):
56      if encoding is None:      if encoding is None:

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26