From d4fc111c2467c6a9d9491807497e13b08b80dc5d Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Tue, 2 Oct 2018 09:18:52 -0500 Subject: [PATCH] Refs #27795 -- Removed force_bytes() usage in admindocs. Refs #12892 is probably obsolete. --- django/contrib/admindocs/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/contrib/admindocs/utils.py b/django/contrib/admindocs/utils.py index fa72d60d57..7347a42180 100644 --- a/django/contrib/admindocs/utils.py +++ b/django/contrib/admindocs/utils.py @@ -5,7 +5,6 @@ from email.errors import HeaderParseError from email.parser import HeaderParser from django.urls import reverse -from django.utils.encoding import force_bytes from django.utils.safestring import mark_safe try: @@ -77,7 +76,7 @@ def parse_rst(text, default_reference_context, thing_being_parsed=None): 'raw_enabled': False, 'file_insertion_enabled': False, } - thing_being_parsed = thing_being_parsed and force_bytes('<%s>' % thing_being_parsed) + thing_being_parsed = thing_being_parsed and '<%s>' % thing_being_parsed # Wrap ``text`` in some reST that sets the default role to ``cmsreference``, # then restores it. source = """