dot-atom = [CFWS] dot-atom-text [CFWS] Any place we can have a dot atom, we could instead have an rfc2047 encoded word.
(value)
| 1382 | return dot_atom_text, value |
| 1383 | |
| 1384 | def get_dot_atom(value): |
| 1385 | """ dot-atom = [CFWS] dot-atom-text [CFWS] |
| 1386 | |
| 1387 | Any place we can have a dot atom, we could instead have an rfc2047 encoded |
| 1388 | word. |
| 1389 | """ |
| 1390 | dot_atom = DotAtom() |
| 1391 | if value[0] in CFWS_LEADER: |
| 1392 | token, value = get_cfws(value) |
| 1393 | dot_atom.append(token) |
| 1394 | if value.startswith('=?'): |
| 1395 | try: |
| 1396 | token, value = get_encoded_word(value) |
| 1397 | except errors.HeaderParseError: |
| 1398 | # XXX: need to figure out how to register defects when |
| 1399 | # appropriate here. |
| 1400 | token, value = get_dot_atom_text(value) |
| 1401 | else: |
| 1402 | token, value = get_dot_atom_text(value) |
| 1403 | dot_atom.append(token) |
| 1404 | if value and value[0] in CFWS_LEADER: |
| 1405 | token, value = get_cfws(value) |
| 1406 | dot_atom.append(token) |
| 1407 | return dot_atom, value |
| 1408 | |
| 1409 | def get_word(value): |
| 1410 | """word = atom / quoted-string |
no test coverage detected
searching dependent graphs…