Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-settings.php on line 472

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-settings.php on line 487

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-settings.php on line 494

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-settings.php on line 530

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-includes/cache.php on line 103

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-includes/theme.php on line 623

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/custom_posts/custom_posts.php on line 22

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/pukiwiki.php on line 46

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/pukiwiki.php on line 67

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/pukiwiki.php on line 75

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/pukiwiki.php on line 92

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiRender.php on line 70

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php on line 181

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php on line 538

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php on line 695

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/modPukiWiki/class/PukiWikiElement.php on line 1087

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112

Deprecated: Function ereg() is deprecated in /home/users/1/fool.jp-ichi/web/blog/wp-content/plugins/wp-ban/wp-ban.php on line 112
[WordPress] ネスト構造のタグがおかしい。 | おれせか
おれせか

なんかそれっぽいのをうにうに。

 -hogehoge
 --fugafuga
 -aaaaaa

↑なふうにpukiwiki記法でリストのネストを書いた時、
本来の出力されるhtmlは以下のようになるはずなんじゃけど、

<ul>
    <li>hogehoge
        <ul>
            <li>fugafuga</li>
        </ul>
    </li>
    <li>aaaaaa</li>
</ul>

なぜか、以下のように妙なとこで</p>タグが出力されてしまう。

<ul>
    <li>hogehoge</p>
        <ul>
            <li>fugafuga</li>
        </ul>
    </li>
    <li>aaaaaa</li>
</ul>

調べてみたらpukiwiki側じゃなくてWordPress側の問題で、どうもhtml直書きでdivなんかをネストしても起こる問題らしい。
牛庵ブログ - WordPressにネスト構造を書くときの挙動がおかしい

とりあえず、しばらくはhtml直書きでネスト作ることも無さそうなので、無理やりにリストのネストの時のみ対応。

  • %inst-dir%/wp-includes/formatting.php のfunction wpautop(~){~}内。
/* ▼08/11/02 ichi 変更▼
 *************************************************/
//$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
if(!preg_match('/\n?<li>(.+?)(?:\n\s*\n|\z)/s', $pee)){
    $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
}
/*************************************************/ 

だいぶムリヤリなので、また変な問題起こるかもしれんけど、それはその時にまた考える。

PAGETOP
PAGETOP
PAGETOP

Comments (11)

とりあえず、しばらくはhtml直書きでネスト作ることも無さそうなので、無理やりにリストのネストの時のみ対応

[2012/12/14 (金) 02:28]

あなたのサイトは非常に人気のある、非常に印象的です!

[2013/02/05 (火) 11:52]

117
thanks for this item because it was great situation and loved it when i initially saw it.

[2013/05/21 (火) 12:24]

とりあえず、しばらくはhtml直書きでネスト作ることも無さそうなので、無理やりにリストのネストの時のみ対応。

[2014/12/25 (木) 13:03]

とりあえず、しばらくはhtml直書きでネスト作ることも無さそうなので、無理やりにリストのネストの時のみ対応。

%inst-dir%/wp-includes/formatting.php のfunction wpautop(~){~}内。

[2015/09/16 (水) 15:58]

l直書きでネスト作るこ

[2015/10/13 (火) 17:01]

私にとって非常に有用なこの記事を見つけることが嬉しいです。

[2015/11/23 (月) 17:50]

ブライトヴィトンリングの流行っている待つ設計。
世界の1流のスーパーマーケットはブランドヴィトンをコピーして推薦します。
ブランドのヴィトン銀座―人気商品&
新作のヴィトンブランドは具体的に包みをコピーして、時計と財布の待つ設計
低価格を提供すると共に、品質を絶対保証しております。
ヴィトンコピーhttp://www.lijka.com/
商品の交換と返品ができます。
ヴィトン財布コピー
一方、優れたスーパーコピー素材で作りますから、質感が素晴らしいです

[2015/12/05 (土) 18:51]

一方、優れたスーパーコピー素材で作りますから、質感が素晴らしいです

[2016/01/15 (金) 17:49]

ブライトヴィトンリングの流行っている待つ設計。
世界の1流のスーパーマーケットはブランドヴィトンをコピーして推薦します。

[2016/06/20 (月) 11:19]

Have a natural attraction for women cosmetics and cheap vape store clothes, no more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment cheap vape store. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the cheap e-cigarettes.

[2018/05/30 (水) 18:31]
PAGETOP

Comment Form

PAGETOP

Trackbacks (0)

トラックバックはありません。

PAGETOP

Trackback URL

PAGETOP

Search