Escape non-ascii characters in JSON passed to <asciinema-player>

This commit is contained in:
Marcin Kulik 2016-10-02 07:22:29 +00:00
parent cda33d42ba
commit cead49590c

View File

@ -77,7 +77,7 @@ module AsciicastsHelper
end end
def base64_poster(asciicast) def base64_poster(asciicast)
'data:application/json;base64,' + Base64.encode64(asciicast.snapshot.to_json) 'data:application/json;base64,' + Base64.encode64(JSON.generate(asciicast.snapshot, ascii_only: true))
end end
end end