title: Is it possible to pass smarty functions into json html output?
body: <p>Trying to implement infinite scroll, with php, smarty and jquery ajax. As I understood best way to do so and not load server much is getting response as json formatted data, and do the all process on the client side. The thing is that I would like to pass smarty functions in that.
  Just a piece of code with comments for you to understand what I mean:</p>
  
  <pre><code>$.each(data.content, function(key, value ){
  if(value.comment !=''){
  
  //When it comes to date, smarty is working and is implementing date_format
  html += '&lt;div class="timeline-date"&gt;&lt;i class="fa fa-calendar"&gt;&lt;/i&gt; 
  {'+value.date+'|date_format:"%B %d, %Y %I:%M %p"}&lt;/div&gt;';
  html += '&lt;/div&gt;';
  
  //But when it comes to comment itself, smarty functions are not working
  html += '&lt;p&gt;{'+value.comment+'|smarty_modifier_autolink|nl2br|mention}&lt;/p&gt;';
  }
  }
  </code></pre>
  
  <p>In second example with comment all I get in browser is <code>+value.comment+</code> instead of the comment itself.
  I'm not strong with <code>json</code> or <code>javascript</code> in general, maybe there is some other way to render html to make it possible to use <code>smarty</code> functions? Thanks everyone!</p>