Changeset 2867 for lang/ruby/ssb
- Timestamp:
- 12/08/07 17:20:07 (13 months ago)
- Location:
- lang/ruby/ssb/trunk/libs
- Files:
-
- 2 modified
-
ssb.rb (modified) (3 diffs)
-
ssb/request.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/ssb/trunk/libs/ssb.rb
r2826 r2867 152 152 153 153 # form action と a href と img src のURLを書き換え 154 page = page.gsub(/ (action|href|src|data) [ ]*=[ ]*[\"']?([^>\"']+)[\"']?([^>]*)>/im) { |s|154 page = page.gsub(/ (action|href|src|data)\s*=\s*[\"']?([^>\"'\s]+)[\"']?([^>]*)>/im) { |s| 155 155 begin 156 156 tag = $1.downcase … … 161 161 %Q! #{tag}="#{$2}"#{$3} target="_top" >! 162 162 when '/' 163 %Q! #{tag}="./?ssb_q=#{ CGI.escape(('http://' + request_uri.host + ':' + request_uri.port.to_s + $2).to_s)}"#{$3} target="_top" >!163 %Q! #{tag}="./?ssb_q=#{WEBrick::HTTPUtils.escape_form(('http://' + request_uri.host + ':' + request_uri.port.to_s + $2).to_s)}"#{$3} target="_top" >! 164 164 else 165 %Q! #{tag}="./?ssb_q=#{ CGI.escape((request_uri + $2).to_s)}"#{$3} target="_top" >!165 %Q! #{tag}="./?ssb_q=#{WEBrick::HTTPUtils.escape_form((request_uri + $2).to_s)}"#{$3} target="_top" >! 166 166 end 167 167 when 'action' … … 174 174 175 175 # xx-small/xx-large を手加減 176 page.gsub!(/xx-small/im, 'small')176 page.gsub!(/xx-small/im, 'small') 177 177 page.gsub!(/xx-large/im, 'large') 178 178 # 絵文字を <img> に変換 -
lang/ruby/ssb/trunk/libs/ssb/request.rb
r2828 r2867 54 54 55 55 def execute 56 return nil if @uri.to_s == 'about:blank' 57 56 58 response = nil 57 return nil if @uri.scheme == 'about'58 59 59 http = http_class(@http_proxy).new(@uri.host, @uri.port) 60 60 if @uri.scheme == 'https' … … 89 89 else 90 90 uri_params << in_query[key].list.map do |value| 91 "#{NKF::nkf('-s', key.dup.untaint)}=#{ CGI.escape(NKF::nkf('-s', value.dup.untaint))}"91 "#{NKF::nkf('-s', key.dup.untaint)}=#{WEBrick::HTTPUtils.escape(NKF::nkf('-s', value.dup.untaint))}" 92 92 end 93 93 end
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)