С PHP, как я могу имитировать поведение автоматической привязки Qaru (что BTW очень круто)?
Например, следующий URL:
http://www.stackoverflow.com/info/1925455/how-to-mimic-stackoverflow-auto-link-behavior
Преобразуется в это:
<a title="how to mimic stackoverflow auto link behavior" rel="nofollow" href="#" onclick="location.href='http://www.stackoverflow.com/info/1925455/how-to-mimic-stackoverflow-auto-link-behavior'; return false;">stackoverflow.com/info/1925455/…</a>
В этом случае мне не нужен атрибут title
.
И это:
Преобразуется в это:
<a rel="nofollow" href="#" onclick="location.href='http://pt.php.net/manual/en/function.base-convert.php#52450'; return false;">pt.php.net/manual/en/…</a>
Как я могу сделать аналогичную функцию в PHP?
PS: Посмотрите мои комментарии по этому вопросу для некоторых примеров и поведений.