From fb2b12ba32dc26c47e6620f2155c6d63e7b592a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 18 May 2022 23:43:04 +0200 Subject: [PATCH] bugfix: don't rewrite external links in included pages --- macros/include | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.2