Calaca
Calaca copied to clipboard
HTML formatting for result.description
Hey Roman,
Quick question, I'm trying to put some HTML in the result description, basically adding some < b r / > 's most specific here: https://github.com/romansanchez/Calaca/blob/master/_site/index.html#L33
Can you point me how to not escaping the description output as a string, instead getting it as HTML?
Cheers!
Me too.. I have seen elsewhere that using {{{ }}} triple mustache works.. but hasn't changed anything with Calaca.
Will keep you updated.
As a hacky fix, I'm just doing the following when the results have been returned:
$("p").each(function(i, current){
var str = $(current).text();
$(current).html(str);
});
It goes through each paragraph element and obtains its text value. Then it sets the html to the text value, so now any html is parsed. I know it ain't the best but it is a quick fix.