I have a simple questions. I have this function using php laravel that outputs a clickable link. This is part of the back end.
public function linkify($text){ //$text = preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[A-Z0-9+&@#\/%=~_|]/i', '<a href="\0">\0</a>', $text); $text = '<a href="http://google.com">http://google.com</a> '; return $text; } foreach ($res as $row) { $subject= $this->linkify($row['subject']); $json['amps'][$x]['subject']= $subject; $x++; } echo json_encode($json);
And this is the front end
{{#each amps}}
<li class="message">
<img src="/images/people/{{pic}}" class="chatpic" alt="">
<div class="message-text">
{{subject}}
</div>
</li>
{{/each}}
The problem is that instead of outputting a clickable link it just displays plain text. I also noticed that the link is wrapped with double quotes Here is the source code from the console window
Any help would be appreciated