mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.11] gh-102507 Remove invisible pagebreak characters (GH-102531) (#108266)
gh-102507 Remove invisible pagebreak characters (GH-102531)
(cherry picked from commit b097925858
)
Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
parent
cc42182c97
commit
dd0a1f9da2
16 changed files with 6 additions and 45 deletions
|
@ -52,12 +52,10 @@ fcre = re.compile(r'[\041-\176]+:$')
|
|||
_embedded_header = re.compile(r'\n[^ \t]+:')
|
||||
|
||||
|
||||
|
||||
# Helpers
|
||||
_max_append = email.quoprimime._max_append
|
||||
|
||||
|
||||
|
||||
def decode_header(header):
|
||||
"""Decode a message header value without converting charset.
|
||||
|
||||
|
@ -152,7 +150,6 @@ def decode_header(header):
|
|||
return collapsed
|
||||
|
||||
|
||||
|
||||
def make_header(decoded_seq, maxlinelen=None, header_name=None,
|
||||
continuation_ws=' '):
|
||||
"""Create a Header from a sequence of pairs as returned by decode_header()
|
||||
|
@ -175,7 +172,6 @@ def make_header(decoded_seq, maxlinelen=None, header_name=None,
|
|||
return h
|
||||
|
||||
|
||||
|
||||
class Header:
|
||||
def __init__(self, s=None, charset=None,
|
||||
maxlinelen=None, header_name=None,
|
||||
|
@ -409,7 +405,6 @@ class Header:
|
|||
self._chunks = chunks
|
||||
|
||||
|
||||
|
||||
class _ValueFormatter:
|
||||
def __init__(self, headerlen, maxlen, continuation_ws, splitchars):
|
||||
self._maxlen = maxlen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue