cvs: livedocs / livedoc_funcs.php
| From: | Edin Kadribasic | Date: | Wed, 09 Feb 2005 18:22:57 +0000 |
| Subject: | cvs: livedocs / livedoc_funcs.php | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969366452@lists.php.net to get a copy of this message | ||
edink Wed Feb 9 13:22:57 2005 EDT
Modified files:
/livedocs livedoc_funcs.php
Log:
Links in user notes #30843
http://cvs.php.net/diff.php/livedocs/livedoc_funcs.php?r1=1.17&r2=1.18&ty=u
Index: livedocs/livedoc_funcs.php
diff -u livedocs/livedoc_funcs.php:1.17 livedocs/livedoc_funcs.php:1.18
--- livedocs/livedoc_funcs.php:1.17 Thu Sep 2 16:36:58 2004
+++ livedocs/livedoc_funcs.php Wed Feb 9 13:22:55 2005
@@ -257,6 +257,13 @@
$node->attributes['role'] = 'php';
$the_note = format_listing($node);
+ // turn urls into links
+ $the_note = preg_replace(
+
"/((mailto|http|ftp|nntp|news):.+?)(>|\\s|\\)|\"|\\.\\s|<|$)/",
+ "<a href=\"\\1\">\\1</a>\\3",
+ $the_note
+ );
+
$inner .= '<div class="usernote"><div
class="noteheader"><span class="user">'.$note['who'].
'</span><br /><span
class="when">'.$date.'</span></div>'.$the_note.'</div>';
}