What is the meaning of “h” in “<%=h [ …] %>”?

前端 未结 6 1812
故里飘歌
故里飘歌 2020-12-24 05:00

When I generate a default scaffold, the display tags on show.html.erb have

<%=h @broker.name %>

I know the difference between &

6条回答
  •  天涯浪人
    2020-12-24 05:23

    html escape. It's a method that converts things like < and > into numerical character references so that rendering won't break your html.

提交回复
热议问题