r""" dtext = / obs-dtext obs-dtext = obs-NO-WS-CTL / quoted-pair We allow anything except the excluded characters, but if we find any ASCII other than the RFC defined printable ASCII, a NonPrintableDefect is added to the token's defects list. Quot
(value)
| 1570 | return obs_local_part, value |
| 1571 | |
| 1572 | def get_dtext(value): |
| 1573 | r""" dtext = <printable ascii except \ [ ]> / obs-dtext |
| 1574 | obs-dtext = obs-NO-WS-CTL / quoted-pair |
| 1575 | |
| 1576 | We allow anything except the excluded characters, but if we find any |
| 1577 | ASCII other than the RFC defined printable ASCII, a NonPrintableDefect is |
| 1578 | added to the token's defects list. Quoted pairs are converted to their |
| 1579 | unquoted values, so what is returned is a ptext token, in this case a |
| 1580 | ValueTerminal. If there were quoted-printables, an ObsoleteHeaderDefect is |
| 1581 | added to the returned token's defect list. |
| 1582 | |
| 1583 | """ |
| 1584 | ptext, value, had_qp = _get_ptext_to_endchars(value, '[]') |
| 1585 | ptext = ValueTerminal(ptext, 'ptext') |
| 1586 | if had_qp: |
| 1587 | ptext.defects.append(errors.ObsoleteHeaderDefect( |
| 1588 | "quoted printable found in domain-literal")) |
| 1589 | _validate_xtext(ptext) |
| 1590 | return ptext, value |
| 1591 | |
| 1592 | def _check_for_early_dl_end(value, domain_literal): |
| 1593 | if value: |
no test coverage detected
searching dependent graphs…