-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decoding of html entities in title does not work properly #264
Comments
Imdb seems to be only escaping characters that mean something to html, so I think htmlspecialchars_decode is an appropriate function to use here. Non ascii characters are represented as UTF-8. php > $a = '&"''';
php > echo htmlspecialchars_decode($a);
&"''
php > echo html_entity_decode($a);
&"''
php > echo html_entity_decode($a, ENT_QUOTES, 'UTF-8');
&"''
php > echo htmlspecialchars_decode($a, ENT_QUOTES);
&"'' Some examples of <title> elements:
|
Thanks for your fast reply. Your provided solution is working for me too. 👍 |
Using: https://www.imdb.com/title/tt13950332/
Test code
Getting
Expecting
I took a look into the code and I could identify the following line in the
title_year()
function:imdbphp/src/Imdb/Title.php
Line 236 in 0074d4c
To get it working properly I replaced the line with:
I'm not sure if this is the proper or best solution, but it worked in my case. There are some other usages of
htmlspecialchars_decode()
in that function I have replaced too.The text was updated successfully, but these errors were encountered: