Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for htmlReplacer (0.14 sec)

  1. src/net/http/fs.go

    		// part of the URL path, and not indicate the start of a query
    		// string or fragment.
    		url := url.URL{Path: name}
    		fmt.Fprintf(w, "<a href=\"%s\">%s</a>\n", url.String(), htmlReplacer.Replace(name))
    	}
    	fmt.Fprintf(w, "</pre>\n")
    }
    
    // serveError serves an error from ServeFile, ServeFileFS, and ServeContent.
    // Because those can all be configured by the caller by setting headers like
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 17:06:47 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  2. src/net/http/server.go

    		fmt.Fprintln(w, body)
    	}
    }
    
    var htmlReplacer = strings.NewReplacer(
    	"&", "&amp;",
    	"<", "&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