function encode(str) {
		return str.replace(/&/g, "&amp;").replace(/</g, "&lt;");
	}
Very basic HTML escaping, not bullet proof.

@param {string} str HTML string to encode
@returns {string} Encoded HTML string.