• Russ Cox's avatar
    encoding/json: escape & always · 080e00d5
    Russ Cox authored
    There are a few different places in the code that escape
    possibly-problematic characters like < > and &.
    This one was the only one missing &, so add it.
    
    This means that if you Marshal a string, you get the
    same answer you do if you Marshal a string and
    pass it through the compactor. (Ironically, the
    compaction makes the string longer.)
    
    Because html/template invokes json.Marshal to
    prepare escaped strings for JavaScript, this changes
    the form of some of the escaped strings, but not
    their meaning.
    
    R=golang-dev, bradfitz
    CC=golang-dev
    https://golang.org/cl/12708044
    080e00d5
Name
Last commit
Last update
..
attr.go Loading commit data...
clone_test.go Loading commit data...
content.go Loading commit data...
content_test.go Loading commit data...
context.go Loading commit data...
css.go Loading commit data...
css_test.go Loading commit data...
doc.go Loading commit data...
error.go Loading commit data...
escape.go Loading commit data...
escape_test.go Loading commit data...
html.go Loading commit data...
html_test.go Loading commit data...
js.go Loading commit data...
js_test.go Loading commit data...
template.go Loading commit data...
transition.go Loading commit data...
url.go Loading commit data...
url_test.go Loading commit data...