Skip to content
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

[BUG]The subscription source has garbled characters. #6180

Open
KawausoJyou opened this issue Mar 8, 2024 · 4 comments · May be fixed by #6181
Open

[BUG]The subscription source has garbled characters. #6180

KawausoJyou opened this issue Mar 8, 2024 · 4 comments · May be fixed by #6181

Comments

@KawausoJyou
Copy link

Describe the bug
The subscription source has garbled characters.
https://peterwunder.de/projects/achievements/atom.xml

To Reproduce
It can be reproduced after subscription.

Expected behavior
The content is displayed normally.

Screenshots
image

Environment information (please complete the following information):

  • OS: Windows 11 23H2
  • Browser: Chrome 122.0.6261.95
  • FreshRSS version: 1.23.1
  • PHP version: PHP 8.2.7
  • Installation type: Docker Compose
@Alkarex
Copy link
Member

Alkarex commented Mar 8, 2024

Could you please try again with the edge version of FreshRSS?

@KawausoJyou
Copy link
Author

Could you please try again with the edge version of FreshRSS?

PixPin_2024-03-08_17-46-17 PixPin_2024-03-08_17-46-29

I have updated it to Edge, but it still doesn't work.

Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Mar 8, 2024
Accept feeds with wrong `<content type="CDATA">` instead of `<content type="html">`
fix FreshRSS#6180
@Alkarex Alkarex linked a pull request Mar 8, 2024 that will close this issue
@Alkarex
Copy link
Member

Alkarex commented Mar 8, 2024

The bug comes from the feed, which contains <content type="CDATA"> which is invalid.
https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fpeterwunder.de%2Fprojects%2Fachievements%2Fatom.xml

It should be <content type="html"> instead.

The reason of the wrong characters are because such an unknown type must be processed as Base64 according to the specification
https://www.rfc-editor.org/rfc/rfc4287#section-4.1.3.3

So it could be good if you could inform the webmaster of the bug.

This seems to be a not-so-unique error:
https://github.com/search?type=code&auto_enroll=true&q=%3Ccontent+type%3D%22CDATA%22%3E
(this includes apparently a feed generator library in Python 🤦🏻‍♂️ https://github.com/lkiesow/python-feedgen Anyone to send them a bug report? https://github.com/lkiesow/python-feedgen/blob/97260abb1793eb164c458c10b493690beb413f6d/feedgen/entry.py#L29C1-L57C35)

So we could consider adding a compatibility for those bad feeds / bad libraries.
Please try this patch #6181

  freshrss:
    image: freshrss/freshrss:6181
    build:
      context: https://github.com/Alkarex/FreshRSS.git#atom-cdata
      dockerfile: Docker/Dockerfile-Alpine
    ...

@Alkarex Alkarex added this to the 1.24.0 milestone Mar 8, 2024
@Alkarex
Copy link
Member

Alkarex commented Mar 8, 2024

Ah, someone has sent a fix already lkiesow/python-feedgen#123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants