As designed REST API BBcode renderer doesn't handle smilies

Jake B.

Well-known member
Affected version
2.2.4
Code:
      "message": ":) 🦆 [img]http://xf22.localhost/data/avatars/l/0/1.jpg?1617741078[/img]",
      "message_parsed": ":) 🦆 <img src=\"http://xf22.localhost/data/avatars/l/0/1.jpg?1617741078\" alt=\"\" />",

is the output I get from the API. Looks like native emoji and embedded images do work, but custom smilies do not
 
This looks to be intentional as smilies are explicitly disabled in the ApiHtml renderer.

The reason for this is because in the majority of cases (think sprite based smilies) CSS would be required to render them and we can't assume your site's CSS will be available to the system reading from the API.

In this case, returning the text version is optimal than sending a transparent image that has no CSS.

Of course if the smilies are image based it would be possible to render them but smilie support is either enabled or disabled in the renderer and a mix of rendered/unrendered smilies is probably worse.

There may be a solution for this in a future version... but for now this is as designed.
 
Back
Top Bottom