From 2cad91cac6e16ae5248542c90eedb27ece0a1e42 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 20 Jul 2015 11:42:25 -0400 Subject: [PATCH] [1.8.x] Fixed #25147 -- Fixed debug view copy-paste/interactive toggle. The whitespace added in 1101467ce0756272a54f4c7bc65c4c335a94111b broke the initial comparison. Backport of d7848c11e008ddeb036a95d389caa3b2c97b795e from master --- django/views/debug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/views/debug.py b/django/views/debug.py index 80b0e38eb1..f352196d3d 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -710,7 +710,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; }