开发者

HtmlPurifier: Display hostnames only with Linkify

Of course you've might heard about HtmlPurifier. I'm using linkify functionality - automatically convert urls to a tags. So, now I want to display only hostnames开发者_StackOverflow社区 but leave full url in href attribute.

Example:

http://www.website.com/article/123-some-cool-article.html

should be converted to

<a href="http://www.website.com/article/123-some-cool-article.html">http://www.website.com</a>

Is that possible?


Not directly, although this would be a trivial patch to Linkify.php.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜