limit characters displayed in span
$(document).ready(function(){
$('.txtReduce').each(function (f) {
var newstr = $(this).text().substring(0,20);
$(this).text(newstr);
});
})
in HTML :
<span class="txtReduce" th:maxlength="20"