mvantellingen/flask-debugtoolbar — Issue #16: Incompatible with flask-login
Author: harryxu
Created: 2012-01-08 13:18:39+00:00
State: open

If flask-login enabled, flask-debugtoolbar will be broken when template render.
```
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 1: ordinal not in range(128)
```

I dived into the flask-login code, the exception was happened on output `session['_id']`.

see: https://bitbucket.org/leafstorm/flask-login/src/45a742185bd2/flaskext/login.py#cl-310 (line 310 - 312)
and
https://bitbucket.org/leafstorm/flask-login/src/45a742185bd2/flaskext/login.py#cl-131

So, may be should not output `session['_id']` on request_vars.html?
eg:

```
{% for key, value in session %}
{% if key != "_id" %}

{{ key|escape }}
{{ value|escape }}

{% endif %}
{% endfor %}
```