XSS safe 한 코딩을 위한 javascript library

function convertToHtml(v)
{
	return v
		.replace(/&/g, "&")
		.replace(/#/g, "&35;")
		.replace(/</g, "&lt;")
		.replace(/>/g, "&gt;")
		.replace(/\(/g, "&40;")
		.replace(/\)/g, "&41;")
	;
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2008-08-27 17:32:32
Processing time 0.0052 sec