How to convert escape characters in HTML tags?

前端 未结 3 1131
忘了有多久
忘了有多久 2020-12-07 04:24

How can we directly convert \"\\u003chtml\\u003e\" to \"\"? Conversion of \"\" to \"\\u003chtml\\u003e\"

3条回答
  •  感动是毒
    2020-12-07 04:48

    You can use the fmt string formatting package for this scope.

    fmt.Printf("%v","\u003chtml\u003e") // will output 
    

    https://play.golang.org/p/ZEot6bxO1H

提交回复
热议问题