Permalink
Browse files

changed deprecated JS escape to encodeURI for UTF-8

  • Loading branch information...
RinTinCan committed Jun 7, 2018
1 parent 3d4e4dd commit 45047f218af5eaf4032b31aa83af0a0823a16a1a
Showing with 2 additions and 2 deletions.
  1. +1 −1 assets/zooscript.src.js
  2. +1 −1 js/zooscript.js
View
@@ -59,7 +59,7 @@ function getNodeValue(node) {
}
function urlEncode(url) {
return escape(url).replace(/\+/g, '%2B');
return encodeURI(url).replace(/\+/g, '%2B');
}
function createNamedElement(tag, name) {
View
@@ -7,7 +7,7 @@ if(typeof(req.setRequestHeader)=="function")
req.setRequestHeader('If-Modified-Since','Sat, 1 Jan 2000 00:00:00 GMT');req.send(null);return false;}
return true;}
function getNodeValue(node){return(node&&node[0]&&node[0].firstChild)?node[0].firstChild.nodeValue:'';}
function urlEncode(url){return escape(url).replace(/\+/g,'%2B');}
function urlEncode(url){return encodeURI(url).replace(/\+/g,'%2B');}
function createNamedElement(tag,name){var element=null;try{element=document.createElement('<'+tag+' name="'+name+'">');}catch(e){}
if(!element||element.tagName!=tag){element=document.createElement(tag);element.name=name;}
return element;}

0 comments on commit 45047f2

Please sign in to comment.