我创建了一个文本节点并插入到我的文档,像这样:防止Nokogiri逃离角色?
#<Nokogiri::XML::Text:0x3fcce081481c "<%= stylesheet_link_tag 'style'%>">]>
当我尝试将文档保存与此:
File.open('ng.html', 'w+'){|f| f << page.to_html}
我实际的文件中得到这样的:
<%= stylesheet_link_tag 'style'%>
有没有办法禁用转义和保存我的网页与我的erb标签完好?
谢谢!
甜!谢谢fotos! – mikewilliamson 2010-07-19 11:31:17