Move htmlspecialchars to util.js
parent
eef62d3656
commit
5848c14701
|
@ -139,15 +139,6 @@ function TreeGridNode(node, grid, level, insertBefore, startHidden)
|
|||
|
||||
(function() {
|
||||
|
||||
function htmlspecialchars(text)
|
||||
{
|
||||
return (''+text).replace(/&/g, '&')
|
||||
.replace(/'/g, ''') // '
|
||||
.replace(/"/g, '"') // "
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
|
||||
TreeGrid.prototype.initStickyHeaders = function(options)
|
||||
{
|
||||
this.sticky = true;
|
||||
|
|
9
util.js
9
util.js
|
@ -1,3 +1,12 @@
|
|||
window.htmlspecialchars = function(text)
|
||||
{
|
||||
return (''+text).replace(/&/g, '&')
|
||||
.replace(/'/g, ''') // '
|
||||
.replace(/"/g, '"') // "
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
};
|
||||
|
||||
window.addListener = (function() {
|
||||
return window.addEventListener
|
||||
? function(el, type, fn) { el.addEventListener(type, fn, false); }
|
||||
|
|
Loading…
Reference in New Issue