MCPcopy
hub / github.com/django/django / characters

Method characters

django/utils/xmlutils.py:23–30  ·  view source on GitHub ↗
(self, content)

Source from the content-addressed store, hash-verified

21 self.endElement(name)
22
23 def characters(self, content):
24 if content and re.search(r"[\x00-\x08\x0B-\x0C\x0E-\x1F]", content):
25 # Fail loudly when content has control chars (unsupported in XML
26 # 1.0) See https://www.w3.org/International/questions/qa-controls
27 raise UnserializableContentError(
28 "Control characters are not supported in XML 1.0"
29 )
30 XMLGenerator.characters(self, content)
31
32 def startElement(self, name, attrs):
33 # Sort attrs for a deterministic output.

Callers 4

addQuickElementMethod · 0.95
handle_fieldMethod · 0.80
handle_fk_fieldMethod · 0.80
handle_m2mMethod · 0.80

Calls 2

searchMethod · 0.80

Tested by

no test coverage detected