Add "total" node + fixes

rel-1.0
Vitaliy Filippov 2016-03-06 13:35:29 +03:00
parent a718b47be7
commit b442cf177c
1 changed files with 3 additions and 3 deletions

View File

@ -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, '&lt;')