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