dimanche 23 octobre 2016

How to find and replace tags to {!! !!} tags after upgrading a Laravel 4.2 application to 5.0

I have upgraded my application from Laravel 4.2 to Laravel 5.0 (the first step on the way to 5.3 :-)

It's quite a lot of work, but one thing causes really headache: I have used Illuminate\Html\HtmlServiceProvider in the past to generate several HTML tags like forms, formelements and links. For example:





As of Laravel 5.0 these links are escaped and to not render as in the past. In 5.0 one must use {!! !!} tags to render these links correctly.

As I do not want to change all in my application to {!! !!} for security reasons, I need a tool for selective searching and replacing recursively in a way, where I can use some kind of variables in the searchstring and use content of the variables in the replace string: shall be replaced to {!! HTML::<inner part> !!}.

I tried to use PHPstorm's "Replace Structurally" function, but I didn't get it to work as needed. I am not sure, if this tool can do what I want.

Question: Can anybody help me to get this PHPstorm function to work? Or has anybody another idea how to easily achieve my goal?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire