lib/spidr/page.rb in spidr-0.1.8 vs lib/spidr/page.rb in spidr-0.1.9

- old
+ new

@@ -250,11 +250,11 @@ # # Converts the specified _link_ into an absolute URL # based on the url of the page. # def to_absolute(link) - # clean the link - link = URI.encode(link.to_s.gsub(/#[a-zA-Z0-9_-]*$/,'')) + # decode, clean then re-encode the URL + link = URI.encode(URI.decode(link.to_s).gsub(/#[a-zA-Z0-9_-]*$/,'')) begin relative = URI(link) absolute = @url.merge(relative)