Skip to content

Commit

Permalink
AO3-6618 Escape characters on bookmark fields fetched with JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
sarken committed Oct 6, 2023
1 parent 660a67a commit c8f8a0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/external_works/fetch.js.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% unless @external_work.blank? %>
$j('#external_work_author').val("<%= @external_work.author %>").change();
$j('#external_work_title').val("<%= @external_work.title %>").change();
$j('#external_work_author').val("<%= escape_javascript(@external_work.author.html_safe) %>").change();
$j('#external_work_title').val("<%= escape_javascript(@external_work.title) %>").change();
$j('#external_work_summary').val("<%= escape_javascript(@external_work.summary&.html_safe) %>").change();
$j('#fetched').val("<%= @external_work.id %>");
$j('#external_work_rating_string').val("<%= @external_work.rating_string %>");
Expand Down

0 comments on commit c8f8a0d

Please sign in to comment.