ふと思い立って、このブログ(livedoor Blog)の
XHTML文法チェックを行ってみた。
予想通り、山のような文法エラーが見つかった。(^^;)
片っ端から修正し、ほとんどは駆逐できたのだが、
ユーザ設定できない以下の部分についてはどうにもならない。
修正不可能な文法エラー
ユーザ設定できない部分なので修正できない。
HTMLテンプレートでアイコンのURLを示す変数の値が異常
次のようなHTMLが生成されてしまう:
<div class="powered">
<a href="http://blog.livedoor.com/">
<img src="http://img.blog.livedoor.com/img/usr/cmn/blog_pro.gif
"
width="117" height="28" border="0" alt="livedoor Blog(ブログ)"
title="livedoor Blog(ブログ)" />
</a>
</div>
なぜか、blog_pro.gif のURL の直後に改行コードが入っている。
これは、HTMLテンプレートでは「<$LDBlogLogo$>」となっている部分。
outfooterの部分
HTMLテンプレートで生成した HTML に、
システムが自動的に追加する outfooter に次のような部分がある:
<script type="text/javascript" src="http://parts.blog.livedoor.jp/js/c.js">
</script>
<script language="JavaScript">blog_counter('hiroaki_sengoku')
</script>
<script type="text/javascript" src="http://blog10.analyzer.livedoor.jp/x.js?pid=39952">
</script>
<noscript>
<img src="http://blog10.analyzer.livedoor.jp/img/a.gif?pid=39952">
</noscript>
なぜか二番目の JavaScript だけ
「language="JavaScript"」という属性になっている。
一番目、三番目と同様「type="text/javascript"」にすべきだと思う。
また、img タグが閉じていないのと、alt属性がない。
以上は、HTMLテンプレートで設定可能な範囲外であるので、
対処できない。
修正可能ではあるものの望ましくない文法エラー
上記の問題点のほか、回避手段があるとはいえ、
以下の点も問題だろう。
「ブログ検索」プラグイン
プラグインとして「ブログ検索」を使用すると、
以下のような HTML を生成してしまう:
<form action="http://sf.livedoor.com/search" method="GET" style="padding:0;margin:0px;">
<input type="HIDDEN" name="q" value="allinblog:http://sengoku.blog.klab.org/">
<input type="TEXT" name="q" class="sf">
<input type="SUBMIT" value="検索" class="sfbtn">
</form>
inputタグが閉じていない。
また、「method="GET"」は「method="get"」のほうがよいだろう。
「ブログ検索」プラグインを使わず、
「フリーエリア」プラグインを使って
正しい XHTML を書けば対処可能ではあるが...
改行をそのまま反映
「投稿フォームの設定」で「改行をそのまま反映」を選択すると、
行末に「<br>」が挿入される。
「<br />」でないと XHTML 的には文法エラーになってしまう。