SIGN IN SIGN UP

Use `json.dumps` to serialise the html template in `create_element`

`escape_quotes` is inadequate here, as it will happily leave multiline strings
as they are, which is a syntax error in javascript. it also doesn't seem to
adequately deal with things like existing backslash escapes in the string.

`json.dumps` is guaranteed to produce valid json, which is also guaranteed to be
a valid javascript data structure. by ensuring the type of `html` to be `str`,
we guarantee that the output of `json.dumps` will be a valid javascript string,
properly quoted and escaped.
M
Mihail Milushev committed
872889dcda4f486770c7d72ef5ef06c116ff2a68
Parent: 9efb528