소스 검색

* Fix wrong recognizing of www URLs where "ewww" would be recognized as an
URL.

Morten Brix Pedersen 22 년 전
부모
커밋
52af27247e
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 0
      docs/Changelog
  2. 1 1
      modules/Pisg/Common.pm

+ 2 - 0
docs/Changelog

@@ -1,6 +1,8 @@
 pisg (x.xx)
 pisg (x.xx)
    * Revert most of the performance improvement changes, they caused bugs.
    * Revert most of the performance improvement changes, they caused bugs.
    * Really fix topics with the mbot format.
    * Really fix topics with the mbot format.
+   * Fix wrong recognizing of www URLs where "ewww" would be recognized as an
+     URL.
 
 
 pisg (0.53) - Tue Mar, 23rd 2004
 pisg (0.53) - Tue Mar, 23rd 2004
    * Several noticeable performance improvements (thanks, Hanno Hecker)
    * Several noticeable performance improvements (thanks, Hanno Hecker)

+ 1 - 1
modules/Pisg/Common.pm

@@ -146,7 +146,7 @@ sub match_urls
     my $str = shift;
     my $str = shift;
 
 
     # Interpret 'www.' as 'http://www.'
     # Interpret 'www.' as 'http://www.'
-    $str =~ s/(http:\/\/)?www\./http:\/\/www\./igo;
+    $str =~ s/\b(http:\/\/)?www\./http:\/\/www\./igo;
 
 
     my @urls;
     my @urls;
     while ($str =~ s/(http|https|ftp|telnet|news)(:\/\/[-a-zA-Z0-9_\/~\@:]+\.[-a-zA-Z0-9.,_~=:&\@%?#\/+]+)//io) { 
     while ($str =~ s/(http|https|ftp|telnet|news)(:\/\/[-a-zA-Z0-9_\/~\@:]+\.[-a-zA-Z0-9.,_~=:&\@%?#\/+]+)//io) {