XF 2.0 BB Code Media and Google Maps

PaulineK

Member
To embed a Google Map in a post you get the Share - Embed link from the Google Map and paste it into your post. I have my BB Code Media set up to replace the Google Maps URL with an IFRAME. But, the embed link already has the IFRAME code in it and that displays as text around the displayed Google Map. I can tell people to just paste in the URL, but this is a bit tricky. Is there any way to remove that IFRAME code?

Also, should I use wildcards instead of spelling out http and https and .com and .co.uk?

URL FROM GOOGLE MAPS
<iframe src="https://www.google.com/maps/embed?p...i768!4f13.1!5e0!3m2!1sen!2suk!4v1517493372228" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

BB CODE MEDIA
MATCHED URLS:
https://www.google.com/maps/embed?pb={$id}
http://www.google.com/maps/embed?pb={$id}
https://www.google.co.uk/maps/embed?pb={$id}
http://www.google.co.uk/maps/embed?pb={$id}

EMBED TEMPLATE
<iframe src="https://www.google.com/maps/embed?pb={$id}" width="100%" height="600" frameborder="0" style="border:0" allowfullscreen></iframe>
 
Top