XF 2.0 BB code media site - regex help

Case

Well-known member
Trying to automatically embed links to Acast podcasts.

So the link may look like: https://www.acast.com/footballramble/earthwormsean

I'm using the following to match the URL's

Code:
#acast\.com/(?P<id>[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+)#siu

And the following embed template:

Code:
<iframe width="400" height="400" src="https://embed.acast.com/{$id}" scrolling="no" frameborder="0" style="border:none;overflow:hidden;"></iframe>

Which all seems fine... except... one of the slashes in the url is being converted to %2F when the bb code is parsed - so the embed breaks.

Any way to stop that slash being converted? I just need it to remain a slash and then it will work.
 
Anyone help with this?

It seems to be an issue with {$id} changing the / from within the id part of the url into %2F

I just need it to remain as /
 
Top Bottom