『(wiki)/lib/make_link.php』
書き換え前
function get_pattern() { $s1 = $this->start + 1; return <<<EOD (\[\[ # (1) open bracket ((?:(?!\]\]).)+) # (2) alias (?:>|:) )? ( # (3) url (?:(?:https?|ftp|news):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+ ) (?($s1)\]\]) # close bracket EOD; }
書き換え後
function get_pattern() { $s1 = $this->start + 1; return <<<EOD (\[\[ # (1) open bracket ((?:(?!\]\]).)+) # (2) alias (?:>|:) )? ( # (3) url (?:(?:\+?https?|\+?ftp|\+?news):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+ ) (?($s1)\]\]) # close bracket EOD; }
書き換え前
function toString() { if (FALSE) { $rel = ''; } else { $rel = ' rel="nofollow"'; } return '<a href="' . $this->name . '"' . $rel . '>' . $this->alias . '</a>'; }
書き換え後
function toString() { if (FALSE) { $rel = ''; } else { $rel = ' rel="nofollow"'; } if (ereg("^(\+)(.*)", $this->name, $regs)) { return '<a href="' . $regs[2] . '" target="_blank" ' . $rel . '>' . $this->alias . '</a>'; }else{ return '<a href="' . $this->name . '"' . $rel . '>' . $this->alias . '</a>'; } }