diff --git a/plugin_html.go b/plugin_html.go index 9c08157..fb0dece 100644 --- a/plugin_html.go +++ b/plugin_html.go @@ -468,7 +468,7 @@ func (c *htmlChecker) safeCall(call *ast.CallExpr) bool { // trustedHTMLRenderers are host and library methods that return sanitized // HTML: the pluginsdk content service's BlockNote renderer and bluemonday. -var trustedHTMLRenderers = map[string]bool{"BlockNoteToHTML": true, "Sanitize": true} +var trustedHTMLRenderers = map[string]bool{"BlockNoteToHTML": true, "Sanitize": true, "CaptchaWidget": true} func stringOr(e ast.Expr) string { s, _ := stringLit(e) diff --git a/testdata/pluginrules/quote-pass/registration.go b/testdata/pluginrules/quote-pass/registration.go index 8cb7c2d..8fe61e0 100644 --- a/testdata/pluginrules/quote-pass/registration.go +++ b/testdata/pluginrules/quote-pass/registration.go @@ -6,6 +6,7 @@ import ( "git.dev.alexdunmow.com/block/pluginsdk/blocks" "git.dev.alexdunmow.com/block/pluginsdk/plugin" + "git.dev.alexdunmow.com/block/pluginsdk/route" "git.dev.alexdunmow.com/block/pluginsdk/templates" "git.dev.alexdunmow.com/private/quote-requests-a1a5c0/db" ) @@ -43,7 +44,7 @@ func renderForm(_ context.Context, content map[string]any) string { return `

` + str(content, "heading") + `

` + `
` + `` + - `
` + `` + route.CaptchaWidget() + `` } // renderRecent lists the latest requests that visitors submitted.