Add "total" node + fixes
parent
a718b47be7
commit
b442cf177c
6
util.js
6
util.js
|
@ -4,7 +4,7 @@
|
|||
* http_build_query, GET, POST, json_decode
|
||||
* getOffset, String.trim, plural_ru, htmlspecialchars, unmg
|
||||
*
|
||||
* Version: 2015-07-23
|
||||
* Version: 2016-03-06
|
||||
*/
|
||||
|
||||
// Cross-browser add/remove event listeners
|
||||
|
@ -162,7 +162,7 @@ window.http_build_query = function(data)
|
|||
{
|
||||
var ii = encodeURIComponent(i);
|
||||
for (var k in data[i])
|
||||
encoded = encoded+'&'+ii+'['+encodeURIComponent(k)+']='+(data[i][k] === false || data[i] === null ? '' : encodeURIComponent(data[i]));
|
||||
encoded = encoded+'&'+ii+'['+encodeURIComponent(k)+']='+(data[i][k] === false || data[i] === null ? '' : encodeURIComponent(data[i][k]));
|
||||
}
|
||||
else
|
||||
encoded = encoded+'&'+encodeURIComponent(i)+'='+(data[i] === false || data[i] === null ? '' : encodeURIComponent(data[i]));
|
||||
|
@ -294,7 +294,7 @@ window.plural_ru = function(count, one, few, many)
|
|||
|
||||
window.htmlspecialchars = function(text)
|
||||
{
|
||||
return text.replace(/&/g, '&')
|
||||
return (''+text).replace(/&/g, '&')
|
||||
.replace(/'/g, ''') // '
|
||||
.replace(/"/g, '"') // "
|
||||
.replace(/</g, '<')
|
||||
|
|
Loading…
Reference in New Issue