FreshRSS / FreshRSS

A free, self-hostable news aggregator…
https://freshrss.org
GNU Affero General Public License v3.0
9.6k stars 820 forks source link

[BUG] CSS Article filter not working with img #6216

Closed sherlcok314159 closed 6 months ago

sherlcok314159 commented 6 months ago

Describe the bug

CSS article filter not working with img

To Reproduce

You can try this feed with a full-article selector as #js_content. And when you select the first img in the article to filter. It is not working.

图片

The first filter works fine.

mp-style-type, img[src="https://mmbiz.qpic.cn/sz_mmbiz_gif/gYUsOT36vfoGnnrz1tAAA0UNPxQaxTGM7WpEmJcx4UPcaibm3FUZpY6Jzicic0sic2fzYicoogTIzwnbNicicos17UGibw/640?wx_fmt=gif&wxfrom=5&wx_lazy=1&wx_co=1"]

And the CSS selector should be correct.

图片

Environment information (please complete the following information):

Device: MacOS
OS: Ubuntu 20.04
Browser: Firefox / Edge
FreshRSS version: 1.23.1
PHP version: 8.2.7
Installation type: Docker-compose

4501

Frenzie commented 6 months ago

The attribute is data-src. The JS on that page uses that to turn it into src. (You're lucky in fact that despite being contained in something named #js_content it's actually there in plain HTML. ;-)

sherlcok314159 commented 6 months ago

Thanks for your help. It works like a charm! I want to ask if are there any other similar examples (e.g., some attribute needs to be transformed into another). I am new to this stuff :-).