[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

@ -18,7 +18,6 @@ from email import errors
from email.encoders import encode_7or8bit
# Flags for types of header encodings
QP = 1 # Quoted-Printable
BASE64 = 2 # Base64
@ -32,7 +31,6 @@ UNKNOWN8BIT = 'unknown-8bit'
EMPTYSTRING = ''
# Defaults
CHARSETS = {
# input header enc body enc output conv
@ -104,7 +102,6 @@ CODEC_MAP = {
}
# Convenience functions for extending the above mappings
def add_charset(charset, header_enc=None, body_enc=None, output_charset=None):
"""Add character set properties to the global registry.
@ -153,7 +150,6 @@ def add_codec(charset, codecname):
CODEC_MAP[charset] = codecname
# Convenience function for encoding strings, taking into account
# that they might be unknown-8bit (ie: have surrogate-escaped bytes)
def _encode(string, codec):
@ -163,7 +159,6 @@ def _encode(string, codec):
return string.encode(codec)
class Charset:
"""Map character sets to their email properties.