Any way to audit view pages for missing h() calls?


#1

I’ve got an app that has about a gazillion <%= statements in the view
pages. I’m pretty sure I’m using h() everywhere I need to, but is
there an easy way to figure out if there are any calls I’ve made that
are missing h() and need it?

Pat


#2

Pat M. wrote:

I’ve got an app that has about a gazillion <%= statements in the view
pages. I’m pretty sure I’m using h() everywhere I need to, but is
there an easy way to figure out if there are any calls I’ve made that
are missing h() and need it?

grep ‘<%=’ view.rhtml | grep -v '<%=\s*h ’

?