Browse Source

new decodeHTML() function in js lib file gcf.js

master
T. Meissner 12 years ago
parent
commit
d4c2bf4699
1 changed files with 23 additions and 1 deletions
  1. +23
    -1
      scripts/gcf.js

+ 23
- 1
scripts/gcf.js View File

@ -6,7 +6,28 @@
* To change this template use File | Settings | File Templates.
*/
gcf = {
var gcf = {
// decode special characters with their utf-8 representation
decodeHtml : function (token) {
var i,
y,
start = [33, 58, 91, 123, 161],
stop = [47, 64, 96, 126, 255],
startLength = start.length;
for (y = 0; y < startLength; y++) {
for (i = start[y]; i <= stop[y]; i++) {
token = token.replace("&#" + i +";", String.fromCharCode(255));
}
}
return token;
},
// xmlhttp object function
getHTTPObject : function () {
@ -66,4 +87,5 @@ gcf = {
}
}

Loading…
Cancel
Save