URLに自動的に target="_blank"を記入する方法。
lib/MT/Util.pmの780行目あたりに、target属性を追加する。
sub munge_comment { my($text, $blog) = @_; unless ($blog->allow_comment_html) { $text = remove_html($text); } if ($blog->autolink_urls) { $text =~ s!(^|\s)(https?://\S+)!$1<a href="$2" target="_blank">$2</a>!gs; } $text; }

コメントする