Update public.php

$line["content_preview"] was modified just before reading $line again, cancelling the changes made by truncate_string() and strip_tags()