Update of /cvsroot/phpmychat/phpmychat/chat
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25160
Modified Files:
input.php handle_inputH.php
Log Message:
Add -, _ and ~ as authorized characters in second part of URLs (Ross Crawford)
Index: input.php
===================================================================
RCS file: /cvsroot/phpmychat/phpmychat/chat/input.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** input.php 1 Apr 2004 09:06:25 -0000 1.1.1.1
--- input.php 12 Oct 2005 07:26:14 -0000 1.2
***************
*** 191,195 ****
$M = eregi_replace('([[:space:]]|^)(www[.])', '\\1http://\\2', $M); // no prefix (www.myurl.ext)
$prefix = '(http|https|ftp|telnet|news|gopher|file|wais)://';
! $pureUrl = '([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+]*)';
$M = eregi_replace($prefix . $pureUrl, '<a href="\\1://\\2" target="_blank">\\1://\\2</a>', $M);
--- 191,195 ----
$M = eregi_replace('([[:space:]]|^)(www[.])', '\\1http://\\2', $M); // no prefix (www.myurl.ext)
$prefix = '(http|https|ftp|telnet|news|gopher|file|wais)://';
! $pureUrl = '([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+-_~]*)';
$M = eregi_replace($prefix . $pureUrl, '<a href="\\1://\\2" target="_blank">\\1://\\2</a>', $M);
Index: handle_inputH.php
===================================================================
RCS file: /cvsroot/phpmychat/phpmychat/chat/handle_inputH.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** handle_inputH.php 1 Apr 2004 09:06:23 -0000 1.1.1.1
--- handle_inputH.php 12 Oct 2005 07:26:14 -0000 1.2
***************
*** 195,199 ****
$M = eregi_replace('([[:space:]]|^)(www[.])', '\\1http://\\2', $M); // no prefix (www.myurl.ext)
$prefix = '(http|https|ftp|telnet|news|gopher|file|wais)://';
! $pureUrl = '([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+]*)';
$M = eregi_replace($prefix . $pureUrl, '<a href="\\1://\\2" target="_blank">\\1://\\2</a>', $M);
--- 195,199 ----
$M = eregi_replace('([[:space:]]|^)(www[.])', '\\1http://\\2', $M); // no prefix (www.myurl.ext)
$prefix = '(http|https|ftp|telnet|news|gopher|file|wais)://';
! $pureUrl = '([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+-_~]*)';
$M = eregi_replace($prefix . $pureUrl, '<a href="\\1://\\2" target="_blank">\\1://\\2</a>', $M);
|