[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:
Miss Islington (bot) 2023-08-22 01:49:35 -07:00 committed by GitHub
parent cc42182c97
commit dd0a1f9da2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 6 additions and 45 deletions

View file

@ -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."""