diff options
| author | Loic Bistuer | 2009-03-14 00:15:46 +0700 | 
|---|---|---|
| committer | Rob Hudson | 2009-03-21 09:18:09 -0700 | 
| commit | 4f680980f9987063c663e46ab190c7aeba552ac7 (patch) | |
| tree | 85dbbb9107960a384ca19c642947743260f7e2a7 | |
| parent | 8c64bb0cc82c6129b4ab14ff4cc80880761680d4 (diff) | |
| download | django-debug-toolbar-4f680980f9987063c663e46ab190c7aeba552ac7.tar.bz2 | |
fixed bug when the string </body> matches more than once in the html
Signed-off-by: Rob Hudson <rob@cogit8.org>
| -rw-r--r-- | debug_toolbar/middleware.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index c3cf5f9..9c46079 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -19,7 +19,7 @@ def replace_insensitive(string, target, replacement):      Code borrowed from: http://forums.devshed.com/python-programming-11/case-insensitive-string-replace-490921.html      """      no_case = string.lower() -    index = no_case.find(target.lower()) +    index = no_case.rfind(target.lower())      if index >= 0:          return string[:index] + replacement + string[index + len(target):]      else: # no results so return the original string | 
