summaryrefslogtreecommitdiff
path: root/misc/dashboard/godashboard/toutf8.py
blob: 544c681b6abe752de9f24d507058d21a54f77dec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

# This is a Django custom template filter to work around the
# fact that GAE's urlencode filter doesn't handle unicode strings.

from google.appengine.ext import webapp

register = webapp.template.create_template_register()

@register.filter
def toutf8(value):
    return value.encode("utf-8")