문서의 이전 판입니다!
function escapeHtml(str) { if (str == null) { return str; } return str .replace(/&/g, '&') .replace(/>/g, '>') .replace(/</g, '<') .replace(/"/g, '"') .replace(/'/g, '''); // Do not use "'", IE does not support. }