r"""ctext = This is not the RFC ctext, since we are handling nested comments in comment and unquoting quoted-pairs here. We allow anything except the '()' characters, but if we find any ASCII other than the RFC defined printable ASCII, a NonPrintableD
(value)
| 1172 | return unstructured |
| 1173 | |
| 1174 | def get_qp_ctext(value): |
| 1175 | r"""ctext = <printable ascii except \ ( )> |
| 1176 | |
| 1177 | This is not the RFC ctext, since we are handling nested comments in comment |
| 1178 | and unquoting quoted-pairs here. We allow anything except the '()' |
| 1179 | characters, but if we find any ASCII other than the RFC defined printable |
| 1180 | ASCII, a NonPrintableDefect is added to the token's defects list. Since |
| 1181 | quoted pairs are converted to their unquoted values, what is returned is |
| 1182 | a 'ptext' token. In this case it is a WhiteSpaceTerminal, so it's value |
| 1183 | is ' '. |
| 1184 | |
| 1185 | """ |
| 1186 | ptext, value, _ = _get_ptext_to_endchars(value, '()') |
| 1187 | ptext = WhiteSpaceTerminal(ptext, 'ptext') |
| 1188 | _validate_xtext(ptext) |
| 1189 | return ptext, value |
| 1190 | |
| 1191 | def get_qcontent(value): |
| 1192 | """qcontent = qtext / quoted-pair |
no test coverage detected