[racktables-users] Nice to have URL links in the comment field.

Version 0.14.5.

$> diff interface.php.org interface.php
663c663,666
< echo '<div class=commentblock>' . $info['comment'] . '</div>';
---
> $ghd_comment = preg_replace( 
> '/(([[:alpha:]][-+.[:alnum:]]*):\/\/(%[[:digit:]A-Fa-f]{2}|[-_.!~*\';\/?%^\\\\:@&={\|}+$#\(\),\[\][:alnum:]])+)/se',
> "'<a href=\"'.rtrim('\\1','.').'\">\\1</a> [<a href=\"'.rtrim('\\1','.').'\" 
> target=\"_blank\">^</a>]'", $info['comment']);
> # echo '<div class=commentblock>' . $info['comment'] . '</div>';
> echo '<div class=commentblock>' . $ghd_comment . '</div>';

This is an cut and paste from the http://www.mantisbt.org/ project.

Maybe you are interested to merge this in a future release.

/Joakim

Other related posts: