fix(web): decode all HTML entities via html.UnescapeString (N11)
This commit is contained in:
1 parent
373e44b9c7
commit
e133f97e1e
2 files changed
+10
-6
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"html"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -271,11 +272,6 @@ func cleanHTMLText(s string) string {
|
||||
}
|
||||
}
|
||||
result := out.String()
|
||||
result = strings.ReplaceAll(result, "&", "&")
|
||||
result = strings.ReplaceAll(result, "<", "<")
|
||||
result = strings.ReplaceAll(result, ">", ">")
|
||||
result = strings.ReplaceAll(result, """, `"`)
|
||||
result = strings.ReplaceAll(result, "'", "'")
|
||||
result = strings.ReplaceAll(result, " ", " ")
|
||||
result = html.UnescapeString(result)
|
||||
return strings.TrimSpace(result)
|
||||
}
|
||||
Reference in new issue
Block a user