improved filters

--HG--
branch : trunk
diff --git a/jinja2/utils.py b/jinja2/utils.py
index af1066c..2e64fe2 100644
--- a/jinja2/utils.py
+++ b/jinja2/utils.py
@@ -26,6 +26,15 @@
     )
 
 
+def soft_unicode(s):
+    """Make a string unicode if it isn't already.  That way a markup
+    string is not converted back to unicode.
+    """
+    if not isinstance(s, unicode):
+        s = unicode(s)
+    return s
+
+
 def pformat(obj, verbose=False):
     """
     Prettyprint an object.  Either use the `pretty` library or the