• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Embedded media: Encoded characters in URLs not parsed properly

Set up a BB Code Media Site for Google Calendar as follows:

Match URLs:
Embed HTML:
<iframe src="https://www.google.com/calendar/embed?mode=AGENDA&amp;height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src={$id}&amp;color=%23B1440E&amp" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>
The URL for the particular calendar I was testing it with includes an encoded "@" as %40:
After the embed is processed, XF converts "%40" to "%2540" (%25 is the encoded version of %), leaving me with this:
<iframe src="https://www.google.com/calendar/embed?mode=AGENDA&amp;height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=romtclpr1677emdmr1v4vpbl5k%2540group.calendar.google.com&amp;color=%23B1440E&amp" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>
Side note: I'm also not sure how to trim the "&ctz=America/New_York" off the end of the URL. Google will tack it onto the calendar URL whenever a user acquires it.


XenForo developer
Staff member
I've fixed this now. I'm just urldecoding the ID that comes out of the URL (provided no callback is being used to process it). This can be worked around by manually tweaking the media tag that gets embedded to change the %40.

Also, the TZ portion of the URL will be ignored -- {$id} doesn't embed across "&" params.