pedroborges / kirby-blade-template

⬢ Laravel Blade template component for Kirby CMS.
MIT License
27 stars 3 forks source link

Echoing kirbytext with an ampersand converts to & #6

Closed syropian closed 7 years ago

syropian commented 7 years ago

Something like {{ $page->text()->kirbytext() }} where the contents includes an & gets converted to &. Any ways around this?

pedroborges commented 7 years ago

Hi @syropian, any expression inside double brackets are automatically sent through Kirby's html function. So in your case it's escaping the text twice. Use the syntax below instead for all kirbytext fields:

{!! $page->text()->kirbytext() !!}

By the way, I'm doing some updates on this plugin to display better error messages on the Whoops page and upgrade it to the latest Blade version. Check back by the end of the week.

syropian commented 7 years ago

Great! Thanks Pedro 🙏