summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authoradityacp2016-09-30 17:54:36 +0530
committeradityacp2016-09-30 17:54:36 +0530
commit513f5a52fec1945250d2fe7d48f1f4e3103cf3a1 (patch)
treecb06a9ba0745239567c636ba437bd6c864652687 /yaksh
parentb515ee32315cc406a28549e3ba10d47d5e0e523b (diff)
downloadonline_test-513f5a52fec1945250d2fe7d48f1f4e3103cf3a1.tar.gz
online_test-513f5a52fec1945250d2fe7d48f1f4e3103cf3a1.tar.bz2
online_test-513f5a52fec1945250d2fe7d48f1f4e3103cf3a1.zip
added utf-8 decoding in custom filters
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/templatetags/custom_filters.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/yaksh/templatetags/custom_filters.py b/yaksh/templatetags/custom_filters.py
index 5baa977..9d7b939 100644
--- a/yaksh/templatetags/custom_filters.py
+++ b/yaksh/templatetags/custom_filters.py
@@ -6,6 +6,7 @@ register = template.Library()
@stringfilter
@register.filter(name='escape_quotes')
def escape_quotes(value):
+ value = value.decode("utf-8")
escape_single_quotes = value.replace("'", "\\'")
escape_single_and_double_quotes = escape_single_quotes.replace('"', '\\"')