From a719251745baf171b0adb2ca6fbe9cfe2d53d276 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Fri, 3 Apr 2015 16:04:00 +0000 Subject: [PATCH] Fix snapshot HTML escaping --- app/helpers/asciicasts_helper.rb | 6 +---- .../{_player.html.slim => _player.html.erb} | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 15 deletions(-) rename app/views/asciicasts/{_player.html.slim => _player.html.erb} (59%) diff --git a/app/helpers/asciicasts_helper.rb b/app/helpers/asciicasts_helper.rb index 89e90e2..a0ed867 100644 --- a/app/helpers/asciicasts_helper.rb +++ b/app/helpers/asciicasts_helper.rb @@ -1,7 +1,7 @@ module AsciicastsHelper def player(asciicast, options = PlaybackOptions.new) - render 'asciicasts/player', asciicast: serialized_asciicast(asciicast), + render 'asciicasts/player', asciicast: AsciicastSerializer.new(asciicast), options: options end @@ -17,10 +17,6 @@ module AsciicastsHelper private - def serialized_asciicast(asciicast) - AsciicastSerializer.new(asciicast).to_json - end - def translate_asset_paths(css) css.gsub(/['"]\/assets\/(.+?)(-\w{32})?\.(.+?)['"]/) { |m| path = assets.find_asset("#{$1}.#{$3}").pathname diff --git a/app/views/asciicasts/_player.html.slim b/app/views/asciicasts/_player.html.erb similarity index 59% rename from app/views/asciicasts/_player.html.slim rename to app/views/asciicasts/_player.html.erb index 6249943..7650e71 100644 --- a/app/views/asciicasts/_player.html.slim +++ b/app/views/asciicasts/_player.html.erb @@ -1,24 +1,25 @@ -.player +
-p.processing-info style="display: none" - | This recording is being pre-processed at the moment. It will open automatically in a few seconds. + -javascript: +