Skip to content

Commit

Permalink
URL判定の正規表現でクエリ文字列の "?" 以降がリンクされないケースにそれっぽい対処
Browse files Browse the repository at this point in the history
  • Loading branch information
arawas committed Jul 9, 2013
1 parent 747f76a commit 632ac5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.php
Expand Up @@ -371,7 +371,7 @@ private function logFilter($logs){
}
}

$log[ 'log' ] = preg_replace_callback( "/(https?|ftp):\/\/([^\s.]+\.)+([a-zA-Z]+)(\/[^\s]+)?/", function($url) use ($on_image,$link_class,&$after){
$log[ 'log' ] = preg_replace_callback( "/(https?|ftp):\/\/([^\s.]+\.)+([a-zA-Z]+)(\/[^\s]+)(?= | |\n|\r)?/u", function($url) use ($on_image,$link_class,&$after){
$url = $url[0];

// URLの短縮と展開
Expand Down

0 comments on commit 632ac5a

Please sign in to comment.