<%= h ...%>是什么?在Rails中意味着什么?
答
用于转义标签的输出以避免跨站点脚本编写。在rails 3中,它已更改为字符串的默认值(因此,您不必说逃避此字符串,而是说这是一个安全的字符串)。
It's for escaping the output of the tag to avoid cross-site-scripting. In rails 3, it's been changed to the default for a string (so rather than saying escape this string, you say, this is a safe string).