This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 591e32cb Fix up relative links
591e32cb is described below

commit 591e32cb2af5384522663ce3c573bd12326f1396
Author: Sebb <s...@apache.org>
AuthorDate: Thu Apr 25 11:20:31 2024 +0100

    Fix up relative links
---
 tools/site-scan.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/site-scan.rb b/tools/site-scan.rb
index 9e2c614d..92255621 100755
--- a/tools/site-scan.rb
+++ b/tools/site-scan.rb
@@ -161,7 +161,11 @@ def parse(id, site, name, podling=false)
     end
     unless a_href =~ %r{^(#|mailto:)}
       begin
-        site2 = URI.join(site,a_href.gsub(' ','+'))
+        if a_href =~ %r{^https?://} # no need to rebase this
+          site2 = a_href
+        else
+          site2 = URI.join(site,a_href.gsub(' ','%20')) # HACK
+        end
         if site2.host == uri.host and site2.path.size > 2
           subpages.add site2.to_s 
         end

Reply via email to