jpw
jpw

Reputation: 19247

rails 3: what does the h() in "content_for(:title) { h(page_title.to_s) }" do?

My app is using a view helper than adds a layout helper that contains the code

content_for(:title) { h(page_title.to_s) }

and I'm trying to modify it somewhat but have no idea what the h() means?

Upvotes: 0

Views: 189

Answers (1)

Jamison Dance
Jamison Dance

Reputation: 20184

It is an ERB method to escape the HTML. See the ERB docs for more info about it.

Upvotes: 6

Related Questions