なぜ、いちいちエスケープを手動で指定しなければいけないのか 文脈によって、自動的にエスケープ手法は決定できるはず と思ってます。 テンプレートエンジン作りたい - kazuhoのメモ置き場 ですよねー。 で,そのへんを自然に取り込んでいるのが,おもに Python 方面で人気のある XML ベースのテンプレートシステムだと思います。 実際,Genshi のドキュメントにも The main feature is a template language that is smart about markup: unlike conventional template languages that only deal with bytes and (if you're lucky) characters, Genshi knows the difference between tags, att