Escape values passed from Rails to Vue to make sure the template can be compiled

This commit is contained in:
Douwe Maan 2017-03-21 13:28:20 -06:00
parent a12c6db887
commit a3111e1406
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@
":can-resolve" => can_resolve,
":author-name" => "'#{j(note.author.name)}'",
"author-avatar" => note.author.avatar_url,
":note-truncated" => "'#{truncate(note.note, length: 17)}'",
":note-truncated" => "'#{j(truncate(note.note, length: 17))}'",
":resolved-by" => "'#{j(note.resolved_by.try(:name))}'",
"v-show" => "#{can_resolve || note.resolved?}",
"inline-template" => true,