cedSha
(Lineaire)
March 23, 2013, 5:43pm
1
Hi all, …
I am trying to display a three level nested list. While everything go smoothly if I put 3 unordered lists, if I change the top one to be ordered list only the first item has number then there is one unexpected closing </ol> tag.
Am I missing something or is this a bug ?
$html = '
<ol>
<li>EXCALIBUR2</li>
<ul>
<li>A : 279</li>
<ul>
<li>30 <i>(0004041)</i></li>
</ul>
</ul>
<li>EXCALIBUR1</li>
<ul>
<li>B : 179</li>
<ul>
<li>30 <i>(0004042)</i></li>
<li>40 <i>(0004043)</i></li>
...
</ul>
</ul>
</ol>';
echo Yii::app()->format->formatHtml($html);
softark
(Softark)
March 24, 2013, 12:05am
2
[color="#006400 "]/* Moved from "Bug Discussions" to "General Discussion for Yii 1.1.x" */[/color]
softark
(Softark)
March 24, 2013, 12:19am
3
Hi CedSha,
You have to put the closing tag of </li> after the nested inner list.
$html = '
<ol>
<li>EXCALIBUR2 <!-- no closing </li> here -->
<ul>
<li>A : 279 <!-- no closing </li> here -->
<ul>
<li>30 <i>(0004041)</i></li>
</ul>
</li> <!-- closing </li> should be here -->
</ul>
</li> <!-- closing </li> should be here -->
<li>EXCALIBUR1
<ul>
<li>B : 179
<ul>
<li>30 <i>(0004042)</i></li>
<li>40 <i>(0004043)</i></li>
</ul>
</li>
</ul>
</li>
...
cedSha
(Lineaire)
March 25, 2013, 9:36pm
4
Hi softark,
Nice !
I have been convinced in my bad using of this nested list by the w3schools.com which give good result with my bad formatted list !
Tks for your time teaching me how to use it (which is not really Yii related…)