(text, encoding)
| 72 | ) |
| 73 | |
| 74 | def _encode(text, encoding): |
| 75 | try: |
| 76 | return text.encode(encoding, "xmlcharrefreplace") |
| 77 | except (TypeError, AttributeError): |
| 78 | _raise_serialization_error(text) |
| 79 | |
| 80 | def _escape_cdata(text, encoding): |
| 81 | # escape character data |
no test coverage detected