Add a warning for StripTags

This commit is contained in:
jvoisin 2024-02-27 13:23:47 +01:00 committed by Frédéric Guillot
parent db6ae707ef
commit b94756bbf0

View file

@ -11,6 +11,7 @@ import (
)
// StripTags removes all HTML/XML tags from the input string.
// This function must *only* be used for cosmetic purposes, not to prevent code injections like XSS.
func StripTags(input string) string {
tokenizer := html.NewTokenizer(bytes.NewBufferString(input))
var buffer bytes.Buffer