Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any clever workaround to avoid having to type the h method everywhere?

It seems ridiculous (and a violation of DRY) to have to type the h method all over the place in your view code to make it safe.

Has anyone come up with a clever workaround for this?

like image 262
conor Avatar asked Dec 22 '22 09:12

conor


1 Answers

DHH (creator of Rails) agrees with you. Rails 3 will escape output by default.

like image 77
Larry K Avatar answered Jan 12 '23 01:01

Larry K