govuk_publishing_components 13.1 → 13.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6ae1813c5f24b844139e7a5d57697718fc515e14a20fc5e3f5337474d085c98
|
4
|
+
data.tar.gz: d2212c52c0b6ee05d6edc95621faf347726fce80d84bc562ba24c163af92d91b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cb079269b5f24931adb289c8eafb83f450ec4601d577dc6fc1a40aed673f6e713e60a62c322b861d52d5b1169581320a44082c13b6f692a480f881013549dd4
|
7
|
+
data.tar.gz: a44bf1a137d8fe11d3dd1f0547b162ff998525ff1fdbf7eb9bd2f17365ec0dcf7364bae12917ec9f0b006c029c1a5b292aa3e772fb012f3b4dc2a59a06191d72
|
@@ -3,9 +3,13 @@
|
|
3
3
|
margin_top ||= 1
|
4
4
|
margin_top_class = "gem-c-feedback--top-margin" if margin_top == 1
|
5
5
|
email_regex = /[^\s=\/?&]+(?:@|%40)[^\s=\/?&]+/
|
6
|
-
stripped_path = request.original_url.gsub(email_regex, '[email]')
|
7
|
-
stripped_url = request.fullpath.gsub(email_regex, '[email]')
|
8
|
-
user_agent = request.user_agent
|
6
|
+
stripped_path = request.original_url.gsub(email_regex, '[email]')
|
7
|
+
stripped_url = request.fullpath.gsub(email_regex, '[email]')
|
8
|
+
user_agent = request.user_agent
|
9
|
+
|
10
|
+
def utf_encode element
|
11
|
+
element.is_a?(String) ? element.encode : element
|
12
|
+
end
|
9
13
|
%>
|
10
14
|
|
11
15
|
<div class="gem-c-feedback <%= margin_top_class %>" data-module="feedback">
|
@@ -90,8 +94,8 @@
|
|
90
94
|
<div class="gem-c-feedback__column-two-thirds">
|
91
95
|
<div class="gem-c-feedback__error-summary gem-c-feedback__js-show js-hidden js-errors" tabindex="-1"></div>
|
92
96
|
|
93
|
-
<input type="hidden" name="url" value="<%= stripped_path -%>">
|
94
|
-
<input type="hidden" name="user_agent" value="<%= user_agent -%>">
|
97
|
+
<input type="hidden" name="url" value="<%= utf_encode(stripped_path) -%>">
|
98
|
+
<input type="hidden" name="user_agent" value="<%= utf_encode(user_agent) -%>">
|
95
99
|
|
96
100
|
<h3 class="gem-c-feedback__form-heading">Help us improve GOV.UK</h3>
|
97
101
|
<p id="feedback_explanation" class="gem-c-feedback__form-paragraph">Don’t include personal or financial information like your National Insurance number or credit card details.</p>
|
@@ -136,11 +140,11 @@
|
|
136
140
|
<div class="gem-c-feedback__column-two-thirds">
|
137
141
|
<div class="gem-c-feedback__error-summary js-hidden js-errors" tabindex="-1"></div>
|
138
142
|
|
139
|
-
<input type="hidden" name="url" value="<%= stripped_path -%>">
|
140
|
-
<input type="hidden" name="user_agent" value="<%= user_agent -%>">
|
143
|
+
<input type="hidden" name="url" value="<%= utf_encode(stripped_path) -%>">
|
144
|
+
<input type="hidden" name="user_agent" value="<%= utf_encode(user_agent) -%>">
|
141
145
|
|
142
146
|
<input name="email_survey_signup[survey_id]" type="hidden" value="footer_satisfaction_survey">
|
143
|
-
<input name="email_survey_signup[survey_source]" type="hidden" value="<%= stripped_path -%>">
|
147
|
+
<input name="email_survey_signup[survey_source]" type="hidden" value="<%= utf_encode(stripped_path) -%>">
|
144
148
|
<input name="email_survey_signup[ga_client_id]" type="hidden" value="1627485790.1515403243">
|
145
149
|
|
146
150
|
<h3 class="gem-c-feedback__form-heading">Help us improve GOV.UK</h3>
|
@@ -158,7 +162,7 @@
|
|
158
162
|
<%= render "govuk_publishing_components/components/button", {
|
159
163
|
text: "Send me the survey"
|
160
164
|
} %>
|
161
|
-
<a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=<%= stripped_url -%>&gcl=1627485790.1515403243" class="gem-c-feedback__email-link govuk-link" id="take-survey" target="_blank" rel="noopener noreferrer">Don’t have an email address?</a>
|
165
|
+
<a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=<%= utf_encode(stripped_url) -%>&gcl=1627485790.1515403243" class="gem-c-feedback__email-link govuk-link" id="take-survey" target="_blank" rel="noopener noreferrer">Don’t have an email address?</a>
|
162
166
|
</div>
|
163
167
|
</div>
|
164
168
|
</form>
|