Use encodeURIComponent in place of encodeURI for website new page title, in order to escape special chars like question mark

This commit is contained in:
Franck Bret 2014-06-11 10:40:31 +02:00
parent f7879c4076
commit e932ecb9df
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@
}
}).then(function (val, field, $dialog) {
if (val) {
var url = '/website/add/' + encodeURI(val);
var url = '/website/add/' + encodeURIComponent(val);
if ($dialog.find('input[type="checkbox"]').is(':checked')) url +="?add_menu=1";
document.location = url;
}