LaravelCollective / docs

Documentation for LaravelCollective Packages
158 stars 103 forks source link

Mention the fact that all HTML/Form helper functions return HtmlString objects? #30

Closed ZhangYiJiang closed 6 years ago

ZhangYiJiang commented 8 years ago

This isn't documented anywhere, but the fact that all Form and HTML helper functions return HtmlString objects means that they can be safely used with normal escaped Blade template tags. ie.

{{ Form::open() }}

works just as fine as

{!! Form::open() !!}

This is probably a safety feature, and there is a minor performance penalty for the former, but it might be worth mentioning anyway?

redgluten commented 8 years ago

Any inputs on the safety and performance concerns @tshafer @adamgoose ?