mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -16,7 +16,6 @@ from base64 import encodebytes as _bencode
|
|||
from quopri import encodestring as _encodestring
|
||||
|
||||
|
||||
|
||||
def _qencode(s):
|
||||
enc = _encodestring(s, quotetabs=True)
|
||||
# Must encode spaces, which quopri.encodestring() doesn't do
|
||||
|
@ -34,7 +33,6 @@ def encode_base64(msg):
|
|||
msg['Content-Transfer-Encoding'] = 'base64'
|
||||
|
||||
|
||||
|
||||
def encode_quopri(msg):
|
||||
"""Encode the message's payload in quoted-printable.
|
||||
|
||||
|
@ -46,7 +44,6 @@ def encode_quopri(msg):
|
|||
msg['Content-Transfer-Encoding'] = 'quoted-printable'
|
||||
|
||||
|
||||
|
||||
def encode_7or8bit(msg):
|
||||
"""Set the Content-Transfer-Encoding header to 7bit or 8bit."""
|
||||
orig = msg.get_payload(decode=True)
|
||||
|
@ -64,6 +61,5 @@ def encode_7or8bit(msg):
|
|||
msg['Content-Transfer-Encoding'] = '7bit'
|
||||
|
||||
|
||||
|
||||
def encode_noop(msg):
|
||||
"""Do nothing."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue