details: http://www.bx.psu.edu/hg/galaxy/rev/5c293dbf0726 changeset: 1715:5c293dbf0726 user: Greg Von Kuster <greg@bx.psu.edu> date: Thu Jan 22 08:50:52 2009 -0500 description: Fixes for formatting end of line chars in html when displaying dataset.info. Also change the biomart tool version. 3 file(s) affected in this change: lib/galaxy/datatypes/data.py tools/data_source/biomart.xml tools/data_source/biomart_test.xml diffs (62 lines): diff -r dbb3210e4549 -r 5c293dbf0726 lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py Wed Jan 21 17:03:39 2009 -0500 +++ b/lib/galaxy/datatypes/data.py Thu Jan 22 08:50:52 2009 -0500 @@ -128,16 +128,22 @@ out = "Can't create peek %s" % str( exc ) return out def display_name(self, dataset): - """Returns formated html of dataset name""" + """Returns formatted html of dataset name""" try: return escape(dataset.name) except: return "name unavailable" def display_info(self, dataset): - """Returns formated html of dataset info""" + """Returns formatted html of dataset info""" try: # Change new line chars to html - return escape( dataset.info ).replace( "\r", "\n" ).replace( "\n", "<br>" ) + if dataset.info.find( '\r\n' ) >= 0: + dataset.info = dataset.info.replace( '\r\n', '<br/>' ) + if dataset.info.find( '\r' ) >= 0: + dataset.info = dataset.info.replace( '\r', '<br/>' ) + if dataset.info.find( '\n' ) >= 0: + dataset.info = dataset.info.replace( '\n', '<br/>' ) + return escape( dataset.info ) except: return "info unavailable" def validate(self, dataset): @@ -154,7 +160,7 @@ Adds a display app to the datatype. app_id is a unique id label is the primary display label, ie display at 'UCSC' - file_function is a string containing the name of the function that returns a properly formated display + file_function is a string containing the name of the function that returns a properly formatted display links_function is a string containing the name of the function that returns a list of (link_name,link) """ self.supported_display_apps = self.supported_display_apps.copy() diff -r dbb3210e4549 -r 5c293dbf0726 tools/data_source/biomart.xml --- a/tools/data_source/biomart.xml Wed Jan 21 17:03:39 2009 -0500 +++ b/tools/data_source/biomart.xml Thu Jan 22 08:50:52 2009 -0500 @@ -7,7 +7,7 @@ TODO: Hack to get biomart to work - the 'add_to_URL' param can be eliminated when the Biomart team encodes URL prior to sending, meanwhile everything including and beyond the first '&' is truncated from URL. They said they'll let us know when this is fixed at their end. --> -<tool name="BioMart" id="biomart" tool_type="data_source" URL_method="get"> +<tool name="BioMart" id="biomart" tool_type="data_source" URL_method="get" version="1.0.1"> <description>Central server</description> <command interpreter="python">data_source.py $output</command> <inputs action="http://www.biomart.org/biomart/martview" check_values="false" method="get" target="_top"> diff -r dbb3210e4549 -r 5c293dbf0726 tools/data_source/biomart_test.xml --- a/tools/data_source/biomart_test.xml Wed Jan 21 17:03:39 2009 -0500 +++ b/tools/data_source/biomart_test.xml Thu Jan 22 08:50:52 2009 -0500 @@ -7,7 +7,7 @@ TODO: Hack to get biomart to work - the 'add_to_URL' param can be eliminated when the Biomart team encodes URL prior to sending, meanwhile everything including and beyond the first '&' is truncated from URL. They said they'll let us know when this is fixed at their end. --> -<tool name="BioMart" id="biomart_test" tool_type="data_source" URL_method="get"> +<tool name="BioMart" id="biomart_test" tool_type="data_source" URL_method="get" version="1.0.1"> <description>Test server</description> <command interpreter="python">data_source.py $output</command> <inputs action="http://test.biomart.org/biomart/martview" check_values="false" method="get" target="_top">