[hg] galaxy 3102: Unicode fix: make it possible to display non-a...
details: http://www.bx.psu.edu/hg/galaxy/rev/b39f3d484220 changeset: 3102:b39f3d484220 user: jeremy goecks <jeremy.goecks@emory.edu> date: Wed Nov 18 09:52:38 2009 -0500 description: Unicode fix: make it possible to display non-acii characters in dataset name. diffstat: lib/galaxy/datatypes/data.py | 5 ++++- templates/root/history_common.mako | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diffs (27 lines): diff -r 03eb232d1111 -r b39f3d484220 lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py Tue Nov 17 19:07:19 2009 -0500 +++ b/lib/galaxy/datatypes/data.py Wed Nov 18 09:52:38 2009 -0500 @@ -146,7 +146,10 @@ def display_name(self, dataset): """Returns formatted html of dataset name""" try: - return escape(dataset.name) + if type ( dataset.name ) is unicode: + return escape( dataset.name ) + else: + return escape( unicode( dataset.name, 'utf-8 ') ) except: return "name unavailable" def display_info(self, dataset): diff -r 03eb232d1111 -r b39f3d484220 templates/root/history_common.mako --- a/templates/root/history_common.mako Tue Nov 17 19:07:19 2009 -0500 +++ b/templates/root/history_common.mako Wed Nov 18 09:52:38 2009 -0500 @@ -43,7 +43,7 @@ %endif </div> <span class="state-icon"></span> - <span class="historyItemTitle"><b>${hid}: ${data.display_name().decode('utf-8')}</b></span> + <span class="historyItemTitle"><b>${hid}: ${data.display_name()}</b></span> </div> ## Body for history items, extra info and actions, data "peek"
participants (1)
-
Greg Von Kuster