We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents caa508d + e081f3d commit 426bdeeCopy full SHA for 426bdee
1 file changed
js/page.js
@@ -1,7 +1,12 @@
1
$('#small-nav-dropdown').change(function() {
2
- window.location = $(this)
+ var selectedValue = $(this)
3
.find('option:selected')
4
- .val()
+ .val();
5
+ if (/^https?:\/\/[^\s/$.?#].[^\s]*$/.test(selectedValue)) {
6
+ window.location = selectedValue;
7
+ } else {
8
+ console.error('Invalid URL:', selectedValue);
9
+ }
10
})
11
12
const site_tag = 'UA-62780441-30';
0 commit comments