app/assets/javascripts/encode_html.js in sprockets-dotjs-3.0.1 vs app/assets/javascripts/encode_html.js in sprockets-dotjs-3.0.2
- old
+ new
@@ -1,8 +1,8 @@
function encodeHTMLSource() {
var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/'},
matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g;
return function() {
- return this ? this.replace(matchHTML, function(m) {return encodeHTMLRules[m] || m; }).replace(/\n/,'<br>') : this;
+ return this ? this.replace(matchHTML, function(m) {return encodeHTMLRules[m] || m; }) : this;
};
}
-String.prototype.encodeHTML = encodeHTMLSource();
\ No newline at end of file
+String.prototype.encodeHTML = encodeHTMLSource();