export.go 305 B

12345678910
  1. package template
  2. // StripTags takes a snippet of HTML and returns only the text content.
  3. //
  4. // For example, `<b>&iexcl;Hi!</b> <script>...</script>` -> `&iexcl;Hi! `.
  5. //
  6. // This function exports the private html/template/stripTags function.
  7. func StripTags(html string) string {
  8. return stripTags(html)
  9. }