Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for htmlReplacer (0.1 sec)

  1. src/net/http/server.go

    		fmt.Fprintln(w, body)
    	}
    }
    
    var htmlReplacer = strings.NewReplacer(
    	"&", "&",
    	"<", "&lt;",
    	">", "&gt;",
    	// "&#34;" is shorter than "&quot;".
    	`"`, "&#34;",
    	// "&#39;" is shorter than "&apos;" and apos was not in HTML until HTML5.
    	"'", "&#39;",
    )
    
    func htmlEscape(s string) string {
    	return htmlReplacer.Replace(s)
    }
    
    // Redirect to a fixed URL
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
Back to top