Hello,
I work on an app (it's not a Laravel app, just PHP / JS) that has been developed by another dev.
In the database there is a table with a description field. Sometimes the users do some copy / paste with a link with parameters.
https://mydomain.com/page?param=4&otherparam=othervalue&...
The getter retrieves the description with nl2br($this->description) (the description is typed by the user in a textarea).
All messages without any link inside it display correctly in the view. But if there is a link, only the start if the link is displayed.
https://mydomain.com/page?param=4
And the &otherparam=othervalue&... doesn't appear in the source code of the view, so that all what is after is inside a link which is not closed with </a>. That means that all the further tags, datas, ... are in this unclosed link.
I want to change the minimum required in the existing code, and I have 2 ideas :
1 - I could just handle the description in the getter in order to display correctly the link when it has to be displayed in the view
2 - I could also try to update the save script of the description in the database taking into account that it could contain a link
In both cases I'm lost because generally I use some plugin like tinyMCE, but in this app, even if is would be possible to add a wysiwyg, I don't think it's a good idea for the moment.
Furthermore there is around 200 lines in the table with this problem, so I have to solve how to display the existing datas, instead it will be necessary to update these lines in the database to avoid the bug.
If you have any idea to help me, thanks in advance ;).
Vincent