public
Rubygem
Description: Mechanize is a ruby library that makes automated web interaction easy.
Homepage: http://mechanize.rubyforge.org/
Clone URL: git://github.com/aaronp/mechanize.git
Search Repo:
Click here to lend your support to: mechanize and make a donation at www.pledgie.com !
fixing a bug with percent signs in the url
aaronp (author)
Sat Jul 05 19:13:09 -0700 2008
commit  281b88d8d02442579d347aee056e5e1ea1eedcf3
tree    2ae895e91627b873edba97ed6aa81b66e7276e93
parent  3d8372ef8eb72fe2f3ad801db51b661674ecc6ea
...
12
13
14
 
 
15
16
17
...
12
13
14
15
16
17
18
19
0
@@ -12,6 +12,8 @@
0
   * Added more examples. Thanks Robert Jackson.
0
   * #20480 Making sure the Host header is set.
0
   * #20672 Making sure cookies with weird semicolons work.
0
+ * Fixed bug with percent signs in urls.
0
+ http://d.hatena.ne.jp/kitamomonga/20080410/ruby_mechanize_percent_url_bug
0
 
0
 === 0.7.6
0
 
...
449
450
451
452
453
 
 
454
455
456
...
449
450
451
 
 
452
453
454
455
456
0
@@ -449,8 +449,8 @@ module WWW
0
   
0
         url = URI.parse(
0
                 Mechanize.html_unescape(
0
- url.split(/%[0-9A-Fa-f]{2}|#/).zip(
0
- url.scan(/%[0-9A-Fa-f]{2}|#/)
0
+ url.split(/(?:%[0-9A-Fa-f]{2})+|#/).zip(
0
+ url.scan(/(?:%[0-9A-Fa-f]{2})+|#/)
0
                   ).map { |x,y|
0
                     "#{URI.escape(x)}#{y}"
0
                   }.join('')

Comments

    No one has commented yet.