...

Source file src/oss.terrastruct.com/d2/lib/svg/text.go

Documentation: oss.terrastruct.com/d2/lib/svg

     1  package svg
     2  
     3  import (
     4  	"bytes"
     5  	"encoding/xml"
     6  )
     7  
     8  func EscapeText(text string) string {
     9  	buf := new(bytes.Buffer)
    10  	_ = xml.EscapeText(buf, []byte(text))
    11  	return buf.String()
    12  }
    13  

View as plain text