As designed REST API: Smilies not replaced in parsed HTML

rik

Member
Affected version
2.2.1
Xenforo 2.2 includes parsed post contents in REST API responses (field message_parsed in the Post data type), see REST API Documentation.

While images, quotes, etc. are transformed to HTML, smilies aren't.

Is that a bug or a feature?

1606291100590.webp
 
This is intentional, mostly because we don't necessarily have a direct formatting approach that can work independent of a XenForo page. Notably, the default smilies use a spritesheet approach which requires other CSS to be present in the page to be rendered properly (it's the specific configuration of each smilie).

Similarly, we don't convert smilies in emails for the same reason.
 
Hey Mike, thanks for your reply.

I suspected that the CSS sprites were the reason for not rendering the smilies.

We've now decided to build our own parser which uses the Smileys XML export.
 
Top Bottom