MCPcopy Index your code
hub / github.com/writefreely/writefreely / stripHTMLWithoutEscaping

Function stripHTMLWithoutEscaping

postrender.go:258–260  ·  view source on GitHub ↗

Strip HTML tags with bluemonday's StrictPolicy, then unescape the HTML entities added in by sanitizing the content.

(content string)

Source from the content-addressed store, hash-verified

256// Strip HTML tags with bluemonday's StrictPolicy, then unescape the HTML
257// entities added in by sanitizing the content.
258func stripHTMLWithoutEscaping(content string) string {
259 return html.UnescapeString(bluemonday.StrictPolicy().Sanitize(content))
260}
261
262func getSanitizationPolicy() *bluemonday.Policy {
263 policy := bluemonday.UGCPolicy()

Callers 4

SummaryMethod · 0.85
PlainDescriptionMethod · 0.85
postTitleFunction · 0.85
friendlyPostTitleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected