JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://github.com/downloads/wycats/handlebars.js/handlebars-1.0.rc.1.js"></script>
<div id="output"></div>
<script id="entry-template" type="text/x-handlebars-template">
  Template with U+2028 character: 

</script>

JavaScript

var source   = $("#entry-template").html();

// regex from json2
// https://github.com/douglascrockford/JSON-js/blob/master/json2.js#L195
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
if (cx.test(source)) {
  source = source.replace(cx, function (a) {
    return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
  });
}


var template = Handlebars.compile(source);
var html     = template({});
$('#output').html(html);