Skip to content

Commit

Permalink
inbo/vlaams-biodiversiteitsportaal#26: Add another missing URI encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVanDyck committed Sep 10, 2024
1 parent 1b1c47a commit f1ef58c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions grails-app/assets/javascripts/region_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@ var region = {
if (!regionWidget.isDefaultFromYear() || !regionWidget.isDefaultToYear()) {
var fromPhrase = regionWidget.isDefaultFromYear() ? '*' : regionWidget.getCurrentState().from + "-01-01T00:00:00Z";
var toPhrase = regionWidget.isDefaultToYear() ? "*" : regionWidget.getCurrentState().to + "-12-31T23:59:59Z";
return "occurrence_year:[" + fromPhrase + " TO " + toPhrase + "]";
var yearRange = encodeURIComponent("[" + fromPhrase + " TO " + toPhrase + "]")
return "occurrence_year:" + yearRange;
} else {
return '';
}
}``
},

/**
Expand Down

0 comments on commit f1ef58c

Please sign in to comment.