19 lines
314 B
Go
19 lines
314 B
Go
package escaper
|
|
|
|
import "strings"
|
|
|
|
// https://www.htmlsymbol.com/html-entities/
|
|
|
|
var htmlEntitesEscaper = strings.NewReplacer(
|
|
`Ä`, "Ä",
|
|
`ä`, "ä",
|
|
`Ö`, "Ö",
|
|
`ö`, "ö",
|
|
`Ü`, "Ü",
|
|
`ü`, "ü",
|
|
)
|
|
|
|
func EscapeHtmlEntites(s string) string {
|
|
return htmlEntitesEscaper.Replace(s)
|
|
}
|