Escape HTML Content
Escape HTML so that special characters don't render as HTML but as text in the browser.
Examples in
Go
package main
import (
"fmt"
"html"
)
func main() {
unescaped := ``
escaped := html.EscapeString(unescaped)
fmt.Println(escaped)
}
Last Run
:
<script>alert(123);</script>