LarsWiegers / laravel-maps

Your laravel maps libary.
https://github.com/LarsWiegers/laravel-maps
MIT License
254 stars 35 forks source link

Error endif when put HTML in popup info ? #38

Closed t-prod closed 1 year ago

t-prod commented 1 year ago

Hi,

Thanks for your awesome package. I try to display an info popup with some HTML. When I do this :

<x-maps-google :zoomLevel="5" :centerPoint="['lat' => 43, 'long' => 5]" :markers="[['lat' => 43.5517, 'long' => 5.19472, 'title' => 'Your Title', 'info' => '<b>Title</b><br>Address<br>Zipcode City<br><a href="https://www.google.fr/maps/search/?api=1&query=Avenues+">Route</a>']]"></x-maps-google>

And I have this error :

image

How can I handle the HTML content in this variable ? Should I convert to something ?

Regards

LarsWiegers commented 1 year ago

Hey! so the problem is that the qoutes are not escaped, this works:

'info' => '<b>Title</b><br>Address<br>Zipcode City<br><a href=\'https://www.google.fr/maps/search/?api=1&query=Avenues+\'>Route</a>']
LarsWiegers commented 1 year ago

Can you let me know if that also works for you 😃

t-prod commented 1 year ago

That's perfect I think I can go with a stripslashes too ;) Thanks again

LarsWiegers commented 1 year ago

awesome!