From a4923943b0cf24176f32356c33fb15763b2ee5c6 Mon Sep 17 00:00:00 2001 From: Ricardo N Feliciano Date: Fri, 21 Sep 2018 17:14:46 -0400 Subject: [PATCH] html/template: not escape + chars in HTML attributes The "+" (plus) symbol is being escaped right now from HTML attributes via html/template even though it's a valid character. This causes what would be a valid ISO8601 date such as 2018-09-19T19:52:28+06:00 to be escaped in an HTML meta tag. Which is unnecessary and may prevent certain search bots and other tools from parsing the date correctly. --- src/html/template/html.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/html/template/html.go b/src/html/template/html.go index 2ea5a7d4bc0e49..0893f076fa478b 100644 --- a/src/html/template/html.go +++ b/src/html/template/html.go @@ -60,7 +60,6 @@ var htmlReplacementTable = []string{ '"': """, '&': "&", '\'': "'", - '+': "+", '<': "<", '>': ">", } @@ -71,7 +70,6 @@ var htmlNormReplacementTable = []string{ 0: "\uFFFD", '"': """, '\'': "'", - '+': "+", '<': "<", '>': ">", }