Commits

bbangert  committed c5557db

[svn] * Fixed tag_options function to not str() string and let html_escape handle
it so unicode is properly handled. Reported with fix by Michael G. Noll.

  • Participants
  • Parent commits a9915d9

Comments (0)

Files changed (2)

 WebHelpers ChangeLog
 
 0.2.2 (**svn**)
+* Fixed tag_options function to not str() string and let html_escape handle
+  it so unicode is properly handled. Reported with fix by Michael G. Noll.
 * Added sqlalchemy.Query support to the pagination orm wrappers, patch from
   Andrija Zarić
 * Fixed python 2.3 compliance in webhelpers.rails (use of sorted()) (Thanks

File webhelpers/rails/tags.py

 def tag_options(**options):
     strip_unders(options)
     cleaned_options = convert_booleans(dict([(x, y) for x,y in options.iteritems() if y is not None]))
-    optionlist = ['%s="%s"' % (x, html_escape(str(y))) for x,y in cleaned_options.iteritems()]
+    optionlist = ['%s="%s"' % (x, html_escape(y)) for x,y in cleaned_options.iteritems()]
     optionlist.sort()
     if optionlist:
         return ' ' + ' '.join(optionlist)