Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for stripTags (0.18 sec)

  1. src/html/template/html_test.go

    	}
    }
    
    func BenchmarkStripTags(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		stripTags("The <i>quick</i>,\r\n<span style='color:brown'>brown</span> fox jumps\u2028over the <canine class=\"lazy\">dog</canine>")
    	}
    }
    
    func BenchmarkStripTagsNoSpecials(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		stripTags("The quick, brown fox jumps over the lazy dog.")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 19 22:45:50 UTC 2015
    - 2.8K bytes
    - Viewed (0)
  2. src/html/template/html.go

    	}
    	if t == contentTypeHTML {
    		return htmlReplacer(stripTags(s), htmlNospaceNormReplacementTable, false)
    	}
    	return htmlReplacer(s, htmlNospaceReplacementTable, false)
    }
    
    // attrEscaper escapes for inclusion in quoted attribute values.
    func attrEscaper(args ...any) string {
    	s, t := stringify(args...)
    	if t == contentTypeHTML {
    		return htmlReplacer(stripTags(s), htmlNormReplacementTable, true)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 02 19:42:28 UTC 2023
    - 7.3K bytes
    - Viewed (0)
Back to top