OSDN Git Service

- fixed bug smarty_modifier_select plugin return value is imcompatible with HTML...
authormumumu-org <mumumu-org@2ef88817-412d-0410-a32c-8029a115e976>
Fri, 13 Jun 2008 15:52:53 +0000 (15:52 +0000)
committermumumu-org <mumumu-org@2ef88817-412d-0410-a32c-8029a115e976>
Fri, 13 Jun 2008 15:52:53 +0000 (15:52 +0000)
CHANGES
class/Ethna_SmartyPlugin.php

diff --git a/CHANGES b/CHANGES
index 2f8b620..59e1f26 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -43,6 +43,8 @@
 - tpl/info.tpl のタグミスを修正
 - smarty_modifier_plugin が配列の場合に、プラグインとして登録されないバグを修正
 - フォームヘルパでセレクトボックスの配列フォームを作ると値が保持されない点を修正 (ethna-users:0868)
+- smarty_modifier_select の戻り値が、諸々のHTML標準と異なっていたバグを修正(thanks: maru_cc)
+-- selected="true" -> selected="selected"
 
 ** 2.3.5
 
index 4486630..e9feace 100644 (file)
@@ -370,8 +370,14 @@ function smarty_modifier_checkbox($string)
  */
 function smarty_modifier_select($string, $value)
 {
+    //    標準に合わせる
+    //    @see http://www.w3.org/TR/html401/interact/forms.html#adef-selected
+    //    @see http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd
+    //    @see http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd
+    //    @see http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-frameset.dtd
+    //    @see http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_sformsmodule
     if ($string == $value) {
-        return 'selected="true"';
+        return 'selected="selected"';
     }
 }
 // }}}