*refプラグインが出力するタグで属性のないファイル名が出力される。 *refプラグインが出力するタグで属性のないファイル名が出力される。 [#p1f778c0] -ページ: BugTrack -投稿者: [[reimy]] -優先順位: 重要 -状態: 完了 -カテゴリー: プラグイン -投稿日: 2003-04-26 (土) 01:49:33 -バージョン: ref.inc.php 1.15 **メッセージ **メッセージ [#bcf8bf85] #ref(http://reimy.com/logo.png) #ref(http://reimy.com/logo.png) これが吐くHTMLタグは次のようになっている(読みにくいので改行を入れてある)。 <div class="img_margin" style="text-align:left"> <a href="http://reimy.com/logo.png" title="logo.png"> <img src="http://reimy.com/logo.png" alt="logo.png" title="logo.png" http://reimy.com/logo.png /> </a></div> ~外部ファイルを指定した場合、<img>タグのtitle属性の後ろに、属性のないファイル名が出力されている。 以下、対策。 ref.inc.php 202行目あたり else { - $info = $url; + $info = ''; } ついでに余計な空白が入るのを防ぐために ref.inc.php 316行目あたり if ($width and $height) { - $info = "width=\"$width\" height=\"$height\""; + $info = "width=\"$width\" height=\"$height\" "; } ref.inc.php 342行目あたり // ファイル種別判定 if ($is_image) // 画像 { - $_url = "<img src=\"$url\" alt=\"$title\" title=\"$title\" $info />"; + $_url = "<img src=\"$url\" alt=\"$title\" title=\"$title\" $info/>"; if (!$params['nolink'] and $url2) { ---- -cvsに投入しました。[[cvs:plugin/ref.inc.php]](v1.4:r1.16) -- [[ぱんだ]] &new{2003-04-26 (土) 14:16:56}; #comment //#comment