diff --git a/app/views/request_for_comments/show.html.slim b/app/views/request_for_comments/show.html.slim index 6b49f216..0afd1055 100644 --- a/app/views/request_for_comments/show.html.slim +++ b/app/views/request_for_comments/show.html.slim @@ -40,7 +40,8 @@ - output_runs.each do |testrun| - output = testrun.try(:output) - if output - - messages = output.scan(/{(?:(?:".+?":".+?")+?,?)+}/) + // (?:\\"|.) is required to correctly identify " within the output. + - messages = output.scan(/{(?:(?:"(?:\\"|.)+?":"(?:\\"|.)+?")+?,?)+}/) - messages.map! {|el| JSON.parse(el)} - messages.keep_if {|message| message['cmd'] == 'write'} - messages.map! {|message| message['data']}