govuk_publishing_components 13.8.0 → 13.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 935e9dfcd4eb2601b445f953a0fcbfe3858aa25b9a9a6c23c741f908fb041edd
|
|
4
|
+
data.tar.gz: 36cee7a76d1479ad1a04945ff4f7f0798de07585eaa4ec9a6dbe18c20d41beca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8dbd777c08df541b871be4916f199993537b3c52ccbafdf25bed302083d1aef04631fa688a4ece15435b1f38bf810f675a9f0d6902fb29afa705e367e085c8ba
|
|
7
|
+
data.tar.gz: eded35362e217f9925fc3d27b55b9a1840da88bc7681278b5aaa9172a5bd7a57396e9de440f804a35ec74aadd597653d5eac5501652e2aebbb8a437cfffd42a3
|
data/app/assets/javascripts/govuk_publishing_components/components/accessible-autocomplete.js
CHANGED
|
@@ -28,13 +28,18 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
this.onConfirm = function(label, removeDropDown) {
|
|
31
|
+
|
|
32
|
+
function escapeHTML(str){
|
|
33
|
+
return new Option(str).innerHTML;
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
if ($selectElem.data('track-category') !== undefined && $selectElem.data('track-action') !== undefined) {
|
|
32
37
|
track($selectElem.data('track-category'), $selectElem.data('track-action'), label, $selectElem.data('track-options'));
|
|
33
38
|
}
|
|
34
39
|
// This is to compensate for the fact that the accessible-autocomplete library will not
|
|
35
40
|
// update the hidden select if the onConfirm function is supplied
|
|
36
41
|
// https://github.com/alphagov/accessible-autocomplete/issues/322
|
|
37
|
-
var value = $selectElem.children("option").filter(function () { return $(this).html() == label; }).val();
|
|
42
|
+
var value = $selectElem.children("option").filter(function () { return $(this).html() == escapeHTML(label); }).val();
|
|
38
43
|
if (typeof value !== 'undefined') {
|
|
39
44
|
$selectElem.val(value).change();
|
|
40
45
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_publishing_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 13.8.
|
|
4
|
+
version: 13.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-02-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govspeak
|