bbcode を解析するクラスを作成しましたが、「エスケープ」を使用すると問題が発生します (関数 chtml::encode は htmlspecialchars のラッパーです)。
MyBBcodeParser: http://snipt.org/srlo0
Case "BBcodeParser::toHtml($input, false)":
Input: [b]hello[/b] <strong>hello2</strong>
Output: <strong>hello</strong> <strong>hello2</strong>
(太字を適用)
Case "BBcodeParser::toHtml($input, true)":
Input: [b]hello[/b] <strong>hello2</strong>
Output: <strong>hello</strong>&lt;strong&gt;hello2&lt;/strong&gt;
2回目のケースからのダブルエスケープが理解できません...