From b18a2a7aa334a99ae51d5557b5eaf83315dad42e Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 31 Oct 2012 10:02:08 -0500 Subject: [PATCH] fixed issue 1117, snitize of unicode, thanks Bill --- VERSION | 2 +- gluon/sanitizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 81aab881..4ae212d9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-10-31 09:52:38) stable +Version 2.2.1 (2012-10-31 10:02:04) stable diff --git a/gluon/sanitizer.py b/gluon/sanitizer.py index e9ded858..37433361 100644 --- a/gluon/sanitizer.py +++ b/gluon/sanitizer.py @@ -220,7 +220,7 @@ def sanitize(text, permitted_tags=[ 'td': ['colspan'], }, escape=True): - if not isinstance(text, str): + if not isinstance(text, basestring): return str(text) return XssCleaner(permitted_tags=permitted_tags, allowed_attributes=allowed_attributes).strip(text, escape)