diff --git a/django/views/debug.py b/django/views/debug.py index d85d385e019..e7f2bbd6b28 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -646,7 +646,7 @@ TECHNICAL_500_TEMPLATE = (""" function switchPastebinFriendly(link) { s1 = "Switch to copy-and-paste view"; s2 = "Switch back to interactive view"; - link.innerHTML = link.innerHTML == s1 ? s2: s1; + link.innerHTML = link.innerHTML.trim() == s1 ? s2: s1; toggle('browserTraceback', 'pastebinTraceback'); return false; }