HTML codes in titles not converted

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
Firehand
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 21 Mar 2013, 11:52

HTML codes in titles not converted

Postby Firehand » 21 Mar 2013, 12:02

Hello,
I've searched for similar topic but didn't find. I have a problem with the article's topics. For example there is a title in the 9GAG feed "It's a little late but.." and it is shown literally. Is it a bug or i should change anything in the Preferences?

Firehand
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 21 Mar 2013, 11:52

Re: HTML codes in titles not converted

Postby Firehand » 22 Mar 2013, 13:00

Anyone? I am not familiar with PHP but i found that you use a method htmlspecialchars() or something for the title which converts the string "It's something" to "It's something"

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: HTML codes in titles not converted

Postby fox » 22 Mar 2013, 13:00

The title gets htmlspecialchars()'d yes to prevent escaping problems breaking layout.

kindachris
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 22 Mar 2013, 23:28

Re: HTML codes in titles not converted

Postby kindachris » 23 Mar 2013, 04:40

fox wrote:The title gets htmlspecialchars()'d yes to prevent escaping problems breaking layout.


I think the title is being double encoded when inserted into ttrs_entries:

Code: Select all

SELECT id,title FROM `ttrss_entries` WHERE `title`LIKE '%&%';

Image

I think that setting the double_encode parameter of the appropriate htmlspecialchars() or htmlentities() to false would prevent this.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: HTML codes in titles not converted

Postby fox » 23 Mar 2013, 09:50

It might be simplepie acting up, tt-rss does no double encoding of those. Hmm.

https://github.com/gothfox/Tiny-Tiny-RS ... 62b7036d9b

Does this help? Not sure if is potentially layout-breaking.

Edit: nevermind, that doesn't do what I thought it would do. :)


Return to “Support”

Who is online

Users browsing this forum: No registered users and 9 guests