Hi,
Use htmlspecialchars on the 50-character substring. This will convert html-active parts, such as < and > into their ascii-code. That way the <a href=""></a> will be translated to a normal texstring:
$a = htmlspecialchars("<a href=\"\"><a>");
echo $a;
the source of the output will look like:
<a href=""><a>
Which does not cause your links to break anymore.
J.