(text)
| 2069 | |
| 2070 | |
| 2071 | def _escape_attrib_c14n(text): |
| 2072 | # escape attribute value |
| 2073 | try: |
| 2074 | if '&' in text: |
| 2075 | text = text.replace('&', '&') |
| 2076 | if '<' in text: |
| 2077 | text = text.replace('<', '<') |
| 2078 | if '"' in text: |
| 2079 | text = text.replace('"', '"') |
| 2080 | if '\t' in text: |
| 2081 | text = text.replace('\t', '	') |
| 2082 | if '\n' in text: |
| 2083 | text = text.replace('\n', '
') |
| 2084 | if '\r' in text: |
| 2085 | text = text.replace('\r', '
') |
| 2086 | return text |
| 2087 | except (TypeError, AttributeError): |
| 2088 | _raise_serialization_error(text) |
| 2089 | |
| 2090 | |
| 2091 | # -------------------------------------------------------------------- |
no test coverage detected
searching dependent graphs…