fixed #70
This commit is contained in:
parent
accc5e5286
commit
201b0a46ba
3 changed files with 27 additions and 2 deletions
|
@ -55,6 +55,21 @@ String.prototype.endsWith = function(suffix) {
|
|||
return this.match(suffix+"$") == suffix;
|
||||
};
|
||||
|
||||
var entityMap = {
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
"/": '/'
|
||||
};
|
||||
|
||||
String.prototype.escapeHTML = function() {
|
||||
return String(this).replace(/[&<>"'\/]/g, function (s) {
|
||||
return entityMap[s];
|
||||
});
|
||||
}
|
||||
|
||||
var console = {
|
||||
log: function(s) {
|
||||
if (OS_TYPE == "mac") {
|
||||
|
|
Reference in a new issue