diff --git a/app/views/assignments/_form.html.erb b/app/views/assignments/_form.html.erb index 0998a243be..b94fa0bc7d 100644 --- a/app/views/assignments/_form.html.erb +++ b/app/views/assignments/_form.html.erb @@ -18,7 +18,7 @@
<%= form.label :description %>
- <%= render :partial => 'editor/index', :locals => {:content => @assignment.description} %> + <%= render :partial => 'editor/index', :locals => {:content => (sanitize @assignment.description)} %>
((something went wrong when loading script)) diff --git a/app/views/assignments/show.html.erb b/app/views/assignments/show.html.erb index 4003c1cf0a..87990a0f4e 100644 --- a/app/views/assignments/show.html.erb +++ b/app/views/assignments/show.html.erb @@ -32,7 +32,7 @@ <% if @assignment.description %>

Description:

- <%= @assignment.description&.html_safe %> + <%= sanitize @assignment.description&.html_safe %>
<% end %> <% if @assignment.restricted_circuit_elements != "None" %> diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index 4d9ee4d8e6..17bda760d0 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -39,7 +39,7 @@
<%= form.label :description %>
- <%= render :partial => 'editor/index', :locals => {:content => @project.description} %> + <%= render :partial => 'editor/index', :locals => {:content => (sanitize @project.description)} %>
<%= form.submit class: 'btn primary-button' %>