From fb590aceee50bf38efd71f5d5080ceb9a002ac7a Mon Sep 17 00:00:00 2001 From: Yewolf Date: Wed, 12 Jul 2023 09:50:52 +0200 Subject: [PATCH] Added src rewriter --- policy.go | 14 ++++++++++++++ sanitize.go | 8 ++++++++ sanitize_test.go | 15 +++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/policy.go b/policy.go index 995f46c..1b3f836 100644 --- a/policy.go +++ b/policy.go @@ -121,6 +121,11 @@ type Policy struct { // if one would want to allow all URL schemes, they would add `.+` allowURLSchemeRegexps []*regexp.Regexp + // If srcRewriter is not nil, it is used to rewrite the src attribute + // of tags that download resources, such as and