Pylons/pyramid_debugtoolbar — pull request #89 by encukou (2013-01-06 02:24:49+00:00)
Title: sqlalchemy: Don't double-encode raw_sql in URLs

Use the "n" filter to disable default_filters when including the raw
SQL in links, leaving only the "u" filter (URL escaping).

SQLAlchemy double-quotes column names when they conflict with SQL
keywords, for example "order".

Since Pyramid sets mako.default_filters to ["h"], all Mako
${}-expressions are HTML-escaped unless the "n" filter is given.
This means that `${'"'}` will output `"`, and `${'"'|u}`
will result in `%26%2334%3B`. `${'"'|u,n}` gives `%22` which is
what we need for the URL.