我正在尝试使用Google App Engine显示网站的源代码。这是我试过的代码片段。显示HTML源代码而不是在GAE中呈现代码
def post(self):
s = 'http://www.bing.com'
fp = urllib.urlopen(s)
src = fp.read()
self.response.out.write(template.render('main.html',{'temp1':src}))
而且我使用的模板有类似
<div style="width:100%;height:100%">{{temp1}}</div>
一些东西这里的问题是,它使源和给我的网站的HTML页面,而不是其本人代码试图嵌入。让我知道如何解决这个问题?
[上一页](http://htmlhelp.com/reference /wilbur/block/pre.html)标签不会转义或忽略标签,只是其中的一部分。 – 2011-04-18 16:54:09