Fix copy/paste error
Test escaping strings with two variables
Switch cStringIO to StringIO for unicode support

The performance difference isn't too bad
Pre-load whole string and use seek to alter tags