Remove <%== usage displaying settings

Using `<%==` is the same as using `raw`. I'm not sure if we meant
`sanitize` in this case, or it's just a typo. I'm assuming the latter
since we don't use anything similar in any other places.
This commit is contained in:
Javi Martín
2019-10-06 03:57:46 +02:00
parent b1b449b187
commit 00a6f5b601
4 changed files with 13 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<% content_for :action_title, t("dashboard.mailing.new.title") %> <% content_for :action_title, t("dashboard.mailing.new.title") %>
<div class="row expanded"> <div class="row expanded">
<div class="small-12 medium-9 column"> <div class="small-12 medium-9 column">
<%== Setting["proposals.email_description"] %> <%= Setting["proposals.email_description"] %>
</div> </div>
<%= render "mailing_options" %> <%= render "mailing_options" %>

View File

@@ -1,7 +1,7 @@
<% content_for :action_title, t("dashboard.polls.index.title") %> <% content_for :action_title, t("dashboard.polls.index.title") %>
<div class="row expanded"> <div class="row expanded">
<div class="small-12 medium-9 column"> <div class="small-12 medium-9 column">
<%== Setting["proposals.poll_description"] %> <%= Setting["proposals.poll_description"] %>
<% if @polls.any? %> <% if @polls.any? %>
<div class="row expanded margin-top" data-equalizer="poll-cards" data-equalize-on="medium"> <div class="row expanded margin-top" data-equalizer="poll-cards" data-equalize-on="medium">

View File

@@ -1,7 +1,7 @@
<% content_for :action_title, t("dashboard.poster.new.title") %> <% content_for :action_title, t("dashboard.poster.new.title") %>
<div class="row expanded"> <div class="row expanded">
<div class="small-12 medium-9 column"> <div class="small-12 medium-9 column">
<%== Setting["proposals.poster_description"] %> <%= Setting["proposals.poster_description"] %>
</div> </div>
<%= render "poster_options" %> <%= render "poster_options" %>

View File

@@ -60,6 +60,16 @@ describe "Cross-Site Scripting protection", :js do
expect(page.text).not_to be_empty expect(page.text).not_to be_empty
end end
scenario "poll description setting in dashboard" do
Setting["proposals.poll_description"] = attack_code
proposal = create(:proposal)
login_as(proposal.author)
visit proposal_dashboard_polls_path(proposal)
expect(page.text).not_to be_empty
end
scenario "annotation context" do scenario "annotation context" do
annotation = create(:legislation_annotation) annotation = create(:legislation_annotation)
annotation.update_column(:context, attack_code) annotation.update_column(:context, attack_code)