projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83ba344
)
Moved from DIMP.
author
Jan Schneider
<jan@horde.org>
Wed, 23 Dec 2009 14:15:56 +0000
(15:15 +0100)
committer
Jan Schneider
<jan@horde.org>
Wed, 23 Dec 2009 14:15:56 +0000
(15:15 +0100)
horde/js/horde.js
patch
|
blob
|
history
diff --git
a/horde/js/horde.js
b/horde/js/horde.js
index
77c8681
..
a06fac3
100644
(file)
--- a/
horde/js/horde.js
+++ b/
horde/js/horde.js
@@
-75,6
+75,17
@@
Object.extend(String.prototype, {
window[func[1]] = eval(func[1]);
}
});
+ },
+
+ /* More efficient String.unfilterJSON() function. */
+ unfilterJSON: function(filter) {
+ if (filter) {
+ return this.replace(filter, '$1');
+ } else if (this.startsWith('/*-secure-') &&
+ this.endsWith('*/')) {
+ return this.slice(10, -2);
+ }
+ return this;
}
});