From f96dbe70e6d52c057234ff2cd1166724044b47e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Oestreicher?= Date: Mon, 27 Feb 2017 14:00:32 +0100 Subject: [PATCH] Use encodeURIComponent() instead of escape() --- qml/js/WallaBase.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qml/js/WallaBase.js b/qml/js/WallaBase.js index c3f831b..71f78d9 100644 --- a/qml/js/WallaBase.js +++ b/qml/js/WallaBase.js @@ -250,10 +250,10 @@ function _sendAuthRequest( props, cb ) var http = new XMLHttpRequest(); var params = "grant_type=password"; - params += "&username=" + escape( props.user ); - params += "&password=" + escape( props.password ); - params += "&client_id=" + escape( props.clientId ); - params += "&client_secret=" + escape( props.clientSecret ); + params += "&username=" + encodeURIComponent( props.user ); + params += "&password=" + encodeURIComponent( props.password ); + params += "&client_id=" + encodeURIComponent( props.clientId ); + params += "&client_secret=" + encodeURIComponent( props.clientSecret ); http.onreadystatechange = function() { if ( http.readyState === XMLHttpRequest.DONE ) { @@ -533,7 +533,7 @@ function uploadNewArticle( props, articleUrl, cb ) url += "/"; url += "api/entries.json"; - var params = "url=" + escape( articleUrl ); + var params = "url=" + encodeURIComponent( articleUrl ); var http = new XMLHttpRequest;