Browse Source

Add a warning for StripTags

jvoisin 2 years ago
parent
commit
b94756bbf0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      internal/reader/sanitizer/strip_tags.go

+ 1 - 0
internal/reader/sanitizer/strip_tags.go

@@ -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