...

Source file src/github.com/noirbizarre/gonja/utils/escape.go

Documentation: github.com/noirbizarre/gonja/utils

     1  package utils
     2  
     3  import "strings"
     4  
     5  func Escape(in string) string {
     6  	output := strings.Replace(in, "&", "&", -1)
     7  	output = strings.Replace(output, ">", ">", -1)
     8  	output = strings.Replace(output, "<", "&lt;", -1)
     9  	output = strings.Replace(output, "\"", "&quot;", -1)
    10  	output = strings.Replace(output, "'", "&#39;", -1)
    11  	return output
    12  }
    13  

View as plain text