Project

General

Profile

Defect #1080 » issue_1080_encoding.patch

Postの際、ruby1.9ではforce_encodingの処理を追加。 - Akiko Takano, 07/10/2012 12:25 PM

View differences:

lib/settings_controller_patch.rb
78 78
            redirect_to :action => 'plugin', :id => @plugin.id
79 79
            return
80 80
          end
81
          
82
          # Workaround for IssueID: #1080
83
          desc = params[:settings][:banner_description]
84
          if desc.respond_to?(:force_encoding)
85
            params[:settings][:banner_description] = desc.force_encoding('UTF-8')
86
          end  
81 87
        rescue => ex
82 88
          # Argument Error
83 89
          # TODO: Exception will happen about 2038 problem. (Fixed on Ruby1.9)
......
87 93
        end     
88 94
      end
89 95
      # Continue to do default action
96
      
90 97
      plugin_without_banner_date_validation
91 98
    end
92 99
  end
    (1-1/1)