diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php index 6c9a2d369..8f96a815f 100644 --- a/include/lib/ac_common.php +++ b/include/lib/ac_common.php @@ -1558,4 +1558,16 @@ function rebuild_access_code($pan_code) $sep=($s_result != "" )?"/":""; } return $s_result; +} + +/*** + * Transform a http link into a clickable link + */ +function add_http_link($text) +{ + + $ret=preg_replace("!http[s]{0,1}://[[:graph:]*]*!",'\0',$text); + + return $ret; + } \ No newline at end of file diff --git a/include/template/detail-action.php b/include/template/detail-action.php index 99d70b320..f3769b8a9 100644 --- a/include/template/detail-action.php +++ b/include/template/detail-action.php @@ -1,5 +1,6 @@ '; - echo h($acomment[0]['agc_comment']); + $comment_http= h($acomment[0]['agc_comment']); + $comment_http=add_http_link($comment_http); + echo $comment_http; echo ''; } } else { @@ -305,6 +307,7 @@ function small(p_id_textarea){ echo $description->input(); } + //---------------------------------- Comment ----------------------------------------------------------------------- if ( Document_Option::can_add_comment($ag_id) && @@ -364,7 +367,7 @@ function small(p_id_textarea){ $comment= h($m_desc.' '.$acomment[$c]['agc_id'].'('.$acomment[$c]['tech_user']." ". $acomment[$c]['str_agc_date'].')').$js. '
'. - " ".h($acomment[$c]['agc_comment']).'' + " ".add_http_link(h($acomment[$c]['agc_comment'])).'' ; } @@ -373,7 +376,7 @@ function small(p_id_textarea){ $comment=h($m_desc.' '.$acomment[$c]['agc_id'].'('.$acomment[$c]['tech_user']." ". $acomment[$c]['str_agc_date'].')'). '
'. - " ".h($acomment[$c]['agc_comment']).'' + " ".add_http_link(h($acomment[$c]['agc_comment'])).'' ; @@ -394,6 +397,7 @@ function small(p_id_textarea){ } } + @@ -488,6 +492,7 @@ for ($i=0;$i