Truly ugly hack, just to see what's what. Note does not deal with multiple text sections.  This stuff really needs to be dealt with in Python -- escape in return_html?