Changeset f5bdb4a in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Apr 27, 2011 5:19:20 PM (14 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
600eca2
Parents:
3b792e1
Message:

fixed html string format problem because of '%" symbol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/pagestate.py

    r4bee68d rf5bdb4a  
    503503                    paramval_string += CENTRE % param + "\n" 
    504504         
     505        text_string = "\n\n\n" + title + "\n\n" + file + \ 
     506                              "\n" + q_name + \ 
     507                              "\n" + chi2 + \ 
     508                              "\n\n" + paramval  
     509         
     510        title_name = self._check_html_format(title_name) 
     511        file_name = self._check_html_format(file_name) 
     512        title = self._check_html_format(title) 
     513                                   
    505514        html_string = title_name + "\n" + file_name + \ 
    506515                                   "\n" + q_range + \ 
     
    511520                                   "\n" + FEET_1 % title + \ 
    512521                                   "\n" + FEET_2  
    513                              
    514         text_string = "\n\n\n" + title + "\n\n" + file + \ 
    515                               "\n" + q_name + \ 
    516                               "\n" + chi2 + \ 
    517                               "\n\n" + paramval  
    518                                             
     522                                                                       
    519523        return html_string, text_string, title 
     524     
     525    def _check_html_format(self, name): 
     526        """ 
     527        Check string '%' for html format 
     528        """ 
     529        if name.count('%'): 
     530            name = name.replace('%', '&#37') 
     531         
     532        return name 
     533     
    520534     
    521535    def report(self, figs=None, canvases=None): 
Note: See TracChangeset for help on using the changeset viewer.