Hello Gregor,
thanks a lot with the html I reproduced the bug,
I also found the open issue,
https://github.com/golang/go/issues/33671
> FWIW, http://json.org agrees that \u escapes are valid JSON and \x 
escapes are not

my question was about if I was missing something, 
and I was missing the html/template and the open issue :)
thanks for your time.

G.

On Friday, 20 March 2020 16:00:15 UTC+1, Gregor Best wrote:
>
> Hi Guilio,
>
> the playground example is using `text/template`. If you use 
> `html/template` instead it'll also do the replacement. 
>
> The behaviour is part of `html/template`'s feature set, and as far as I 
> can remember (since at least 2015) has been present under the umbrella of 
> context aware escaping of special characters.
> On 20.03.20 11:40, liuggio wrote:
>
> Hello everybody, 
> we are issuing on our website a problem with templating,
>
> variable is: "+" 
> is converted to:  "+"
> and inside the *<script* is converted to: "\x2b"
> the output of that function is:   
>                     "plain": "&#43;"   
>                     <script type="application/ld+json" >
>                       { "plain inside ld+json": "\x2b"  }   
>
> i created the running example https://play.golang.org/p/sGP2Y2KCXLg
> but in the play.golang.org website the bug is not visible (maybe 'cause) 
> it uses the v1.13
>
> on my local (mac) and also on golang-1.14-alpine the problem can be easily 
> reproduced.
>
> this is breaking all the seo on our website, 
> and is this is breaking compatibility with the past version.
> am I missing something?
>
> thanks a lot.
> Giulio
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golan...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/CALphBct9bULDxwUebSSzhxUi%3D8BUyaDqcMchPPsBbj9CL-nWrA%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/golang-nuts/CALphBct9bULDxwUebSSzhxUi%3D8BUyaDqcMchPPsBbj9CL-nWrA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> -- 
> --
>   Gregor Best
>   be...@pferdewetten.de <javascript:>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8141d359-b6f2-4b8e-974d-14dc0e458440%40googlegroups.com.

Reply via email to