add: text = text.replace(/\n/g, "<br />"); 
context: function encodeText(text) {	var escapeXml = options.escapeXmlEntities;	if (escapeXml == 'always') {		// & -> &amp;		// &amp; -> &amp;amp;		// &quot; -> &amp;quot;		// &nbsp; -> &nbsp;		text = text.replace(/&(\w+);/g, '%%tmp_entity%%$1%%');		text = text.replace(/%%tmp_entity%%(amp|apos|quot|lt|gt)%%/g, '&$1;');		text = text.replace(/&/g, '&amp;');		text = text.replace(/%%tmp_entity%%(\w+)%%/g, '&$1;');		text = text.replace(/\'/g, '&apos;');		text = text.replace(/\"/g, '&quot;');	} else if (escapeXml == 'html') {		// & -> &		// ' -> '		// \xA0 -> &nbsp;		// &amp; -> &amp;amp;		// &quot; -> &amp;quot;		// &nbsp; -> &amp;nbsp;		text = text.replace(/&(nbsp|amp|quot|apos|lt|gt|\d+|x\d+)(;|\W)/g, '&amp;$1$2');		text = text.replace(/\xA0/g, '&nbsp;');		text = text.replace(/ {2,}/g, function(str) {				var result = '';				for (var i = 0; i < str.length; i++) {					result += '&nbsp;';				}				return result;			}); // convert multiple spaces to nbsp	}	if (escapeXml == 'always' || escapeXml == 'partial') {		text = text.replace(/</g, '&lt;');		text = text.replace(/>/g, '&gt;');	}	if ('true' == options.escapeDollar) {		text = text.replace(/([^\$])\$\{/g, '$1\\${'); // replace ${...} to \${...}		text = text.replace(/^\$\{/g, '\\${'); // replace ${...} to \${...}		text = text.replace(/\$\$\{/g, '${'); // replace $${...} to ${...}	}	return text;}
meta: 3175	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3175/f9e10fae39b92cc24106a3c51c969e4984378223/html.js/clean/src/content/formats/html.js