github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/html/template/escape.go (about)

     1  // Copyright 2011 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package template
     6  
     7  import (
     8  	"github.com/shogo82148/std/io"
     9  )
    10  
    11  // HTMLEscapeは、プレーンテキストデータbのエスケープされたHTML相当をwに書き込みます。
    12  func HTMLEscape(w io.Writer, b []byte)
    13  
    14  // HTMLEscapeStringは、プレーンテキストデータsのエスケープされたHTML相当を返します。
    15  func HTMLEscapeString(s string) string
    16  
    17  // HTMLEscaperは、その引数のテキスト表現のエスケープされたHTML相当を返します。
    18  func HTMLEscaper(args ...any) string
    19  
    20  // JSEscapeは、プレーンテキストデータbのエスケープされたJavaScript相当をwに書き込みます。
    21  func JSEscape(w io.Writer, b []byte)
    22  
    23  // JSEscapeStringは、プレーンテキストデータsのエスケープされたJavaScript相当を返します。
    24  func JSEscapeString(s string) string
    25  
    26  // JSEscaperは、その引数のテキスト表現のエスケープされたJavaScript相当を返します。
    27  func JSEscaper(args ...any) string
    28  
    29  // URLQueryEscaperは、その引数のテキスト表現のエスケープされた値を、
    30  // URLクエリに埋め込むのに適した形式で返します。
    31  func URLQueryEscaper(args ...any) string