|
From: <tom...@us...> - 2010-02-04 23:15:15
|
Revision: 2095
http://ndlb.svn.sourceforge.net/ndlb/?rev=2095&view=rev
Author: tombenner
Date: 2010-02-04 23:15:08 +0000 (Thu, 04 Feb 2010)
Log Message:
-----------
Made all "&"s in wiki URLs encoded in Thl::UtilsController#proxy
Modified Paths:
--------------
portal/ror/plugins/thdl_integration/trunk/app/controllers/thl/utils_controller.rb
Modified: portal/ror/plugins/thdl_integration/trunk/app/controllers/thl/utils_controller.rb
===================================================================
--- portal/ror/plugins/thdl_integration/trunk/app/controllers/thl/utils_controller.rb 2010-02-04 22:07:57 UTC (rev 2094)
+++ portal/ror/plugins/thdl_integration/trunk/app/controllers/thl/utils_controller.rb 2010-02-04 23:15:08 UTC (rev 2095)
@@ -10,6 +10,13 @@
url += '&' + url_params unless url_params.blank?
url = "http://www.thlib.org" + url if url[0,1] == "/"
+ # Any "&"s in the url sent to wiki_reader.php need to be replaced by "%26"
+ if url =~ /wiki_reader\.php\?url=/
+ url_split = url.split("wiki_reader.php?url=")
+ url_split[1].gsub!("&", "%26")
+ url = url_split.join("wiki_reader.php?url=")
+ end
+
# Parse the URL with URI.parse() so we can work with its parts more easily
uri = URI.parse(URI.encode(url));
requested_host = uri.host
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|