func HTMLAttribute(in string) string {
	var out = &bytes.Buffer{}
	for _, c := range in {
		if (c >= 65 && c <= 90) || (c >= 97 && c <= 122) || (c >= 48 && c <= 57) || (c >= 44 && c <= 46) || c == 95 {
			out.WriteRune(c)
		} else if c == 34 {
			out.WriteString("&quot;")
		} else if c == 38 {
			out.WriteString("&amp;")
		} else if c == 60 {
			out.WriteString("&lt;")
		} else if c == 62 {
			out.WriteString("&gt;")
		} else if c <= 31 && c != 9 && c != 10 && c != 13 {
			out.WriteString("&#xFFFD;")
		} else {
			fmt.Fprintf(out, "&#%d;", c)
		}
	}
	return out.String()
}
HTMLAttribute provides a Twig-compatible escaper for HTML attributes.
package escape  
import (
	"bytes"
	"fmt"
)
func HTML(in string) string {
	var out = &bytes.Buffer{}
	for _, c := range in {
		if c == 34 {
			out.WriteString("&quot;")
		} else if c == 38 {
			out.WriteString("&amp;")
		} else if c == 39 {
			out.WriteString("&#39;")
		} else if c == 60 {
			out.WriteString("&lt;")
		} else if c == 62 {
			out.WriteString("&gt;")
		} else {
			out.WriteRune(c)
		}
	}
	return out.String()
}