MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.16k stars 808 forks source link

Metadata presented with HTML-escaped characters #325

Closed doron1 closed 11 years ago

doron1 commented 11 years ago

When the metadata for an item contains a character that is HTML escaped, non-browser client (i.e. MBC) presents the escape sequence rather than render the original char. Case in point, ampersand. When there’s an amp in the metadata, MBC will present it as & amp; (no space) rather than render it. This probably applies to all HTML escaped chars (gt, lt etc.). I'm told (ebr) this is a server side issue since the server is supposed to send out Plain Text rather than HTML.

LukePulverenti commented 11 years ago

What source did this come from? We are not actually escaping characters ourselves.

ebr11 commented 11 years ago

Some providers have html overviews. Maybe IMDb when sourced via things like Metab...?

I also know that Last.fm has html overviews and bios.

doron1 commented 11 years ago

Tried to backtrack the source but apparently metadata for the item has been replaced (from a different source?) in my collection since I opened this. Also noticed that other items have an ampersand in their metadata text which is displayed as an ampersand.. So, apparently you're right - it has to be the source that does the escaping. I'd just presume it's any source from which you pick up data as HTML. (it's even conceivable that it's a bug in one of the sources, which had some HTML stuff uploaded or copied into - although this seems less likely).

At any rate, such escaped chars are conveniently displayed properly when the server is accessed via a browser (obviously), but less so when data is rendered by a client (MBC).

LukePulverenti commented 11 years ago

Unless you can provide a specific example I'm going to close this. I don't want to put a fix in that I can't test. If the metadata came from the internet then tell me what item it was, or if it's from an xml file, then post a sample.

doron1 commented 11 years ago

Fair enough. Here is an example. On the web site, and when accessing the server using a browser over HTTP, this is rendered properly (by the browser). Via MBC, the escaping shows up on all the ampersands.