[英]escaping image_tag in rails
In my view I have: 我认为我有:
= image_tag i.object.image(:big)
This makes my browser render the image, 这使我的浏览器呈现图像,
I would like instead my browser to show the HTML tag, I need this to get the image tag ready ready to be copy pasted somewhere else. 相反,我希望浏览器显示HTML标记,我需要这样做才能准备好将图像标记准备好复制粘贴到其他地方。
I've tried with: 我尝试过:
= h image_tag i.object.image(:big)
but the image is rendered as well 但是图像也被渲染
试试这个= "#{image_tag i.object.image(:big)}"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.