diff --git a/claat/parser/gdoc/parse.go b/claat/parser/gdoc/parse.go index faa564a1c..e837a7b59 100644 --- a/claat/parser/gdoc/parse.go +++ b/claat/parser/gdoc/parse.go @@ -686,7 +686,7 @@ func image(ds *docState) nodes.Node { // For iframe, make sure URL ends in allowlisted domain. ok := false for _, domain := range nodes.IframeAllowlist { - if strings.HasSuffix(u.Hostname(), domain) { + if u.Hostname() == domain { ok = true break } diff --git a/claat/parser/md/parse.go b/claat/parser/md/parse.go index 63090be53..346537c1c 100644 --- a/claat/parser/md/parse.go +++ b/claat/parser/md/parse.go @@ -776,7 +776,7 @@ func image(ds *docState) nodes.Node { // For iframe, make sure URL ends in allowlisted domain. ok := false for _, domain := range nodes.IframeAllowlist { - if strings.HasSuffix(u.Hostname(), domain) { + if u.Hostname() == domain { ok = true break }