API bug: Single quotes returned escaped as ' in some cases

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
palii
Posts: 3
Joined: Sun Dec 17, 2017 3:48 pm

API bug: Single quotes returned escaped as ' in some cases

Postby palii » Mon Dec 17, 2018 9:25 am

In some cases the API returns episode titles with single quotes html escaped and sometimes not escaped. For example:

Bugged: Amercian Horror Story - Season 7 Episode 2
  • - Don't Be Afraid of the Dark
Corrent: Amercian Horror Story - Season 5 Episode 4
  • - Devil's Night

palii
Posts: 3
Joined: Sun Dec 17, 2017 3:48 pm

Re: API bug: Single quotes returned escaped as ' in some cases

Postby palii » Wed Dec 19, 2018 6:11 pm

I did further testing directly on the api and can confirm the bug using https://api.thetvdb.com/swagger

[BAD EPISODE NAME] https://api.thetvdb.com/episodes/6208554

Code: Select all

{
  "data": {
    "id": 6208554,
    "airedSeason": 7,
    "airedSeasonID": 715862,
    "airedEpisodeNumber": 2,
    "episodeName": "Don't Be Afraid of the Dark",
    "firstAired": "2017-09-12",
   .........
  }
}


[GOOD EPISODE NAME] https://api.thetvdb.com/episodes/5309449

Code: Select all

{
  "data": {
    "id": 5309449,
    "airedSeason": 5,
    "airedSeasonID": 632319,
    "airedEpisodeNumber": 4,
    "episodeName": "Devil's Night",
    "firstAired": "2015-10-28",
   .........
  }
}