comparison markup/filters.py @ 182:2f30ce3fb85e trunk

Renamed `Attributes` to `Attrs` to reduce the verbosity.
author cmlenz
date Mon, 21 Aug 2006 20:03:13 +0000
parents 47bbd9d2a5af
children
comparison
equal deleted inserted replaced
181:e103b75a96ce 182:2f30ce3fb85e
17 frozenset 17 frozenset
18 except NameError: 18 except NameError:
19 from sets import ImmutableSet as frozenset 19 from sets import ImmutableSet as frozenset
20 import re 20 import re
21 21
22 from markup.core import Attributes, Namespace, stripentities 22 from markup.core import Attrs, Namespace, stripentities
23 from markup.core import END, END_NS, START, START_NS 23 from markup.core import END, END_NS, START, START_NS
24 24
25 __all__ = ['HTMLSanitizer', 'IncludeFilter'] 25 __all__ = ['HTMLSanitizer', 'IncludeFilter']
26 26
27 27
65 tag, attrib = data 65 tag, attrib = data
66 if tag not in self._SAFE_TAGS: 66 if tag not in self._SAFE_TAGS:
67 waiting_for = tag 67 waiting_for = tag
68 continue 68 continue
69 69
70 new_attrib = Attributes() 70 new_attrib = Attrs()
71 for attr, value in attrib: 71 for attr, value in attrib:
72 value = stripentities(value) 72 value = stripentities(value)
73 if attr not in self._SAFE_ATTRS: 73 if attr not in self._SAFE_ATTRS:
74 continue 74 continue
75 elif attr in self._URI_ATTRS: 75 elif attr in self._URI_ATTRS:
Copyright (C) 2012-2017 Edgewall Software