mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-25 20:29:45 -04:00
URI-encode search string on form submit
This prevents the search form from setting an invalid URL. Resolves #1153
This commit is contained in:
parent
9255185716
commit
05adcde88d
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ var Navigation = React.createClass({
|
|||
this.closeRegistration();
|
||||
},
|
||||
onSearchSubmit: function (formData) {
|
||||
window.location.href = '/search/projects?q=' + formData.q;
|
||||
window.location.href = '/search/projects?q=' + encodeURIComponent(formData.q);
|
||||
},
|
||||
render: function () {
|
||||
var classes = classNames({
|
||||
|
|
Loading…
Add table
Reference in a new issue