[ticket/12357] Support routes in generate_smilies() function.

https://tracker.phpbb.com/browse/PHPBB3-12357