If input token contains ASCII non-printables, register a defect.
(xtext)
| 1019 | re.escape(''.join(EXTENDED_ATTRIBUTE_ENDS)))).match |
| 1020 | |
| 1021 | def _validate_xtext(xtext): |
| 1022 | """If input token contains ASCII non-printables, register a defect.""" |
| 1023 | |
| 1024 | non_printables = _non_printable_finder(xtext) |
| 1025 | if non_printables: |
| 1026 | xtext.defects.append(errors.NonPrintableDefect(non_printables)) |
| 1027 | if utils._has_surrogates(xtext): |
| 1028 | xtext.defects.append(errors.UndecodableBytesDefect( |
| 1029 | "Non-ASCII characters found in header token")) |
| 1030 | |
| 1031 | def _get_ptext_to_endchars(value, endchars): |
| 1032 | """Scan printables/quoted-pairs until endchars and return unquoted ptext. |
no test coverage detected
searching dependent graphs…