Fixed Autolinking affected by short code to emoji replacements


Well-known member
Affected version
XF v2.1.0
When I paste a link from eBay it will not unfurl.

Example of typical eBay URL:


After saving the post, the link will show like this with the emoji added at the end:


If I remove everything after the ? in the URL like this example:


the unfurl functions correctly:


Well-known member
The last part of the first url is creating a emoji. That emoji create a wrong url. The problem is the :pf: in the end of the url.


Well-known member
When posting the following text, XenForo turns emoji shortcodes like :flag_pf: into an emoji (and thus breaks the URL):

There is no issue if I manually enclose the URL in "URL" bb codes like this (instead of letting XenForo auto-link it):


It seems like XenForo first replaces emoji shortcodes and then auto-links URLs. It should work the other way around.

You can see the real non-reduced eBay URL where this has happened here:
Last edited:


Well-known member
Thanks for moving my post. Please note that the issue I reported seems unrelated to unfurling (we have not enabled URL unfurling).

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.1).

Change log:
Use a slightly more strict regex when detecting shortcodes in order to not necessarily attempt to replace embedded shortcodes, especially those inside URLs.
Any changes made as a result of this issue being resolved may not be rolled out here until later.