Ruby on rails 3.2 img标记在Atom提要Rails中未呈现为html entry.content'.html\u-safe,:type=>html'
但是,当我在Chrome中查看时,输出如下:Ruby on rails 3.2 img标记在Atom提要Rails中未呈现为html entry.content'.html\u-safe,:type=>html',ruby-on-rails-3.2,atom-feed,Ruby On Rails 3.2,Atom Feed,但是,当我在Chrome中查看时,输出如下: entry.content "<img src=#{resource.image.url(:medium)} width='280', height='180'>".html_safe, :type => 'html' imgsrc=http://s3.amazonaws.com/agile_designer_uploads/images/790/medium.png?1356457984 宽度='280',高度='180' 如
entry.content "<img src=#{resource.image.url(:medium)} width='280', height='180'>".html_safe, :type => 'html'
imgsrc=http://s3.amazonaws.com/agile_designer_uploads/images/790/medium.png?1356457984 宽度='280',高度='180'
如果只有img标签能够正确呈现,那么所有的标签都将是玫瑰色的
有没有关于如何正确渲染的想法?为了避免html标记被转义,您可以使用图像标记并在其上调用html\u safe
entry.content image\u标记(resource.image.url(:medium)).html\u safe,:type=>'html'
我必须在这里验证我的atom提要格式:
一旦它验证了所显示的图像
<content type="html"><img src=http://s3.amazonaws.com/agile_designer_uploads/images/790/medium.png?1356457984 width='280', height='180'></content>