diff options
| author | Aymeric Augustin | 2013-10-18 17:01:52 +0200 | 
|---|---|---|
| committer | Aymeric Augustin | 2013-10-18 17:01:52 +0200 | 
| commit | 186fcb318a87e6e89add597b8dc2d8443a765bc8 (patch) | |
| tree | 242147f92f340c63ac62913a3c0a03d5c31646b7 /debug_toolbar/utils/sql.py | |
| parent | c2c3ccf8987ff4809b770c5329801496d770f27d (diff) | |
| download | django-debug-toolbar-186fcb318a87e6e89add597b8dc2d8443a765bc8.tar.bz2 | |
Ensure the toolbar only outputs valid XML.
This allows using it in websites served with the application/xml+xhtml
mime type. Fix #221.
Diffstat (limited to 'debug_toolbar/utils/sql.py')
| -rw-r--r-- | debug_toolbar/utils/sql.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/debug_toolbar/utils/sql.py b/debug_toolbar/utils/sql.py index 4e0d70d..2810699 100644 --- a/debug_toolbar/utils/sql.py +++ b/debug_toolbar/utils/sql.py @@ -29,5 +29,5 @@ def reformat_sql(sql):  def swap_fields(sql): -    return re.sub('SELECT</strong> (.*?) <strong>FROM', 'SELECT</strong> <a class="djDebugUncollapsed djDebugToggle" href="#">•••</a> ' + +    return re.sub('SELECT</strong> (.*?) <strong>FROM', 'SELECT</strong> <a class="djDebugUncollapsed djDebugToggle" href="#">•••</a> ' +          '<a class="djDebugCollapsed djDebugToggle" href="#">\g<1></a> <strong>FROM', sql) | 
