I hope I understand the question. I think you are asking: Why Tornado not selectively escapes certain tags/attributes?
preventing cross site injection is a tricky and almost an art by itself.
how do you decide which dom tag/attribute is safe and which one is not?
let me give you an example:
or another one:
<style>body { content: "your html now looks like 4chan" }</style>
The general rule of "it is better to be safe than sorry" is usually a good rule to follow.
Thats why Tornado escapes everything.
Didip Kerabat