Changeset 149

Show
Ignore:
Timestamp:
14-09-11 12:59:30 (3 years ago)
Author:
kostas.karasavvas@…
Message:

Removed our html_sanitise in favour of CGI::unescapeHTML

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t2-web/trunk/bin/t2_webapp.rb

    r147 r149  
    88require 't2-server' 
    99require 'myexperiment-rest' 
     10require 'cgi' 
    1011#require "web-t2" TODO: move whole of WebT2App in lib 
    1112 
     
    2829    def t2_library_sanitize(string) 
    2930      ex = string.gsub('"', "'") 
    30     end 
    31  
    32  
    33     # used by haml code to place default values in textareas, etc. 
    34     def html_sanitise(string) 
    35       # escape double quotes characters 
    36       ex = string.gsub('"', '"') 
    37       # convert newlines to HTML newlines to display in textareas inputs 
    38       ex = ex.gsub(/[\n]/, '
') 
    3931    end 
    4032 
     
    160152    @run_uuid = run.uuid 
    161153 
     154    # Set workflow inputs 
    162155    @my_exp_wkf.inputs.each do |input| 
    163156      if params[:"upload-checkbox-#{input.name}"] == "yes" 
    164157        filename = params[:"#{input.name}-file"] 
    165158        tmp_filename = "/tmp/#{WEB_APP_NAME}/#{filename}" 
     159 
     160        # make sure that the file is uploaded completely, i.e. all it's 
     161        # connections are closed 
     162        #while `lsof -c cp | grep /tmp/#{WEB_APP_NAME}/#{filename}` != "" 
     163        #  sleep 1 
     164        #end 
     165         
    166166        chomp_last_newline(tmp_filename) 
    167167        run.upload_input_file(input.name, tmp_filename)