Files
VAR.WebFormsCore/Scrummer/Scripts/01. Base.js
2015-05-29 23:26:32 +02:00

21 lines
517 B
JavaScript

function GetElement(element) {
if (typeof element == "string") {
element = document.getElementById(element);
}
return element;
}
function escapeHTML(s) {
return s.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}
function fixedEncodeURIComponent(str) {
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16);
});
}