Fix referer escaping

This commit is contained in:
Omar Roth 2019-05-03 12:15:21 -05:00
parent 757ea93393
commit ad8750b40d
No known key found for this signature in database
GPG key ID: B8254FB7EC3D37F2
6 changed files with 6 additions and 6 deletions

View file

@ -13,7 +13,7 @@
</button>
</div>
<div class="pure-u-1-2">
<a class="pure-button" href="<%= referer %>">
<a class="pure-button" href="<%= URI.escape(referer) %>">
<%= translate(locale, "No") %>
</a>
</div>

View file

@ -3,7 +3,7 @@
<% end %>
<div class="h-box">
<form class="pure-form pure-form-aligned" enctype="multipart/form-data" action="/data_control?referer=<%= referer %>" method="post">
<form class="pure-form pure-form-aligned" enctype="multipart/form-data" action="/data_control?referer=<%= URI.escape(referer) %>" method="post">
<fieldset>
<legend><%= translate(locale, "Import") %></legend>

View file

@ -13,7 +13,7 @@
</button>
</div>
<div class="pure-u-1-2">
<a class="pure-button" href="<%= referer %>">
<a class="pure-button" href="<%= URI.escape(referer) %>">
<%= translate(locale, "No") %>
</a>
</div>

View file

@ -9,7 +9,7 @@ function update_value(element) {
</script>
<div class="h-box">
<form class="pure-form pure-form-aligned" action="/preferences?referer=<%= referer %>" method="post">
<form class="pure-form pure-form-aligned" action="/preferences?referer=<%= URI.escape(referer) %>" method="post">
<fieldset>
<legend><%= translate(locale, "Player preferences") %></legend>

View file

@ -19,7 +19,7 @@
</div>
<div class="pure-u-1-3" style="text-align:right">
<h3>
<a href="/data_control?referer=<%= referer %>">
<a href="/data_control?referer=<%= URI.escape(referer) %>">
<%= translate(locale, "Import/export") %>
</a>
</h3>

View file

@ -11,7 +11,7 @@
<div class="pure-u-1-3"></div>
<div class="pure-u-1-3" style="text-align:right">
<h3>
<a href="/preferences?referer=<%= referer %>"><%= translate(locale, "Preferences") %></a>
<a href="/preferences?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Preferences") %></a>
</h3>
</div>
</div>