Lines Matching refs:cls
82 def _substitute_html_entity(cls, matchobj): argument
83 entity = cls.CHARACTER_TO_HTML_ENTITY.get(matchobj.group(0))
87 def _substitute_xml_entity(cls, matchobj): argument
90 entity = cls.CHARACTER_TO_XML_ENTITY[matchobj.group(0)]
131 def substitute_xml(cls, value, make_quoted_attribute=False): argument
144 value = cls.AMPERSAND_OR_BRACKET.sub(
145 cls._substitute_xml_entity, value)
148 value = cls.quoted_attribute_value(value)
153 cls, value, make_quoted_attribute=False): argument
166 value = cls.BARE_AMPERSAND_OR_BRACKET.sub(
167 cls._substitute_xml_entity, value)
170 value = cls.quoted_attribute_value(value)
174 def substitute_html(cls, s): argument
185 return cls.CHARACTER_TO_HTML_ENTITY_RE.sub(
186 cls._substitute_html_entity, s)
265 def strip_byte_order_mark(cls, data): argument
291 def find_declared_encoding(cls, markup, is_html=False, search_entire_document=False): argument
771 def detwingle(cls, in_bytes, main_encoding="utf8", argument
804 if (byte >= cls.FIRST_MULTIBYTE_MARKER
805 and byte <= cls.LAST_MULTIBYTE_MARKER):
808 for start, end, size in cls.MULTIBYTE_MARKERS_AND_SIZES:
812 elif byte >= 0x80 and byte in cls.WINDOWS_1252_TO_UTF8:
819 byte_chunks.append(cls.WINDOWS_1252_TO_UTF8[byte])