*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

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Site admin: PukiWiki Development Team

PukiWiki 1.5.4+ © 2001-2022 PukiWiki Development Team. Powered by PHP 8.2.12. HTML convert time: 0.037 sec.

SourceForge