14 lines
155 B
Go
14 lines
155 B
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
"encoding/xml"
|
||
|
)
|
||
|
|
||
|
func XMLEscape(s string) string {
|
||
|
var b bytes.Buffer
|
||
|
xml.Escape(&b, []byte(s))
|
||
|
|
||
|
return b.String()
|
||
|
}
|