From: Paul Hänsch Date: Wed, 18 May 2022 21:43:04 +0000 (+0200) Subject: bugfix: don't rewrite external links in included pages X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=fb2b12ba32dc26c47e6620f2155c6d63e7b592a6;p=shellwiki bugfix: don't rewrite external links in included pages --- diff --git a/macros/include b/macros/include index cf6286d..d35c2a3 100755 --- a/macros/include +++ b/macros/include @@ -57,7 +57,9 @@ page_glob "$page" \ | md \ | grep -vx '' ) | sed -E ' + s;(<[^>]+ )(href|src)="([^"]+://[^"]*|[mM][aA][iI][lL][tT][oO]:[^"]*)"([^>]*>);\1\2="/#safe/\3"\4;g s;(<[^>]+ )(href|src)="([^#/"][^"]*)"([^>]*>);\1\2="'"${refpfx}"'\3"\4;g + s;(<[^>]+ )(href|src)="/#safe/([^"]*)"([^>]*>);\1\2="\3"\4;g ' printf '' done