code: def characters(self, chars):
          
          self._finish_pending_start_element()
          if not is_valid_cdata_str(chars):
              raise ValueError("control characters are not allowed in "
                               "well-formed XML")
          self._write(xml.sax.saxutils.escape(
              chars,
              self._additional_escapes,
          ).encode("utf-8"))
docs: Put character data in the currently open element. Special characters
          (such as ``<``, ``>`` and ``&``) are escaped.
  
          If `chars` contains any ASCII control character, :class:`ValueError` is
          raised.