Skip to content

Commit e7c0f56

Browse files
committed
auto-linkify links in output previews
1 parent 33a9b2c commit e7c0f56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

job.output.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function _print_row($row) {
102102
$content .= '<b>';
103103
else if ($i <= $keycount)
104104
$content .= '<i>';
105-
$content .= htmlspecialchars($col);
105+
$content .= preg_replace('/((http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&amp;:\/~+#-]*[\w@?^=%&amp;\/~+#-])?)/', '<a target="_blank" href="\1">\1</a>', htmlspecialchars($col));
106106
if ($i == 0)
107107
$content .= '</b>';
108108
else if ($i < $keycount)

0 commit comments

Comments
 (0)