• 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
..
template Loading commit data...
entity.go Loading commit data...
entity_test.go Loading commit data...
escape.go Loading commit data...
escape_test.go Loading commit data...