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

How to stop RSS-Bridge from escaping/sanitizing html? #3880

Closed
adegans opened this issue Jan 9, 2024 · 8 comments · Fixed by #3882
Closed

How to stop RSS-Bridge from escaping/sanitizing html? #3880

adegans opened this issue Jan 9, 2024 · 8 comments · Fixed by #3882
Labels
Bug-Report Confirmed bug report

Comments

@adegans
Copy link

adegans commented Jan 9, 2024

Describe the bug
I'm trying to make a bridge that adds an iframe to the item['content']. How do I NOT output html as a string/text but instead have it render the html?
Is there some kind of escape or non-sanitize function?

When I look in the source several key <'s have a ‌ added to it. Breaking the output.

I've gone over the manuals but can't find any useful information.

Expected behavior
HTML to be html and not text.

@adegans adegans added the Bug-Report Confirmed bug report label Jan 9, 2024
@adegans
Copy link
Author

adegans commented Jan 9, 2024

I know it's not really a bug report, but it fitted the best of the 3 options.

@dvikan
Copy link
Contributor

dvikan commented Jan 9, 2024

yes rss-bridge escapes <iframe> and <script>

there are historical reasons for this. I think maybe we can drop that now at least in the atom and mrss outputs.

modern feed readers sanitizes the html so should not really be a problem

@em92

@adegans
Copy link
Author

adegans commented Jan 9, 2024

Yea, I found that and am testing with a object and embed tag now. Not sure which one is better and both don’t respond well to height settings it seems. Not sure if an iframe will be better of if it’s a netnewswire quirk.

I’ve had similar feeds in FreshRSS that did iframes and it worked fine. So it might be desirable to allow iframes through RSS Bridge as well.

@dvikan
Copy link
Contributor

dvikan commented Jan 9, 2024

fixed for outputs atom, mrss and json

@dvikan
Copy link
Contributor

dvikan commented Mar 31, 2024

how is it working out for ya @adegans

@adegans
Copy link
Author

adegans commented Mar 31, 2024

Haven't really tested anything yet but I will soon (tm)

@adegans
Copy link
Author

adegans commented Mar 31, 2024

I just installed 2024-02-02.
A first test shows iframes still rendered as text.

@adegans
Copy link
Author

adegans commented Mar 31, 2024

In the site preview...
In a RSS Feed it works as intended.

This:
Screenshot 2024-03-31 at 00 03 54

vs this:
Screenshot 2024-03-31 at 00 04 06

Otherwise it works fine with an iFrame. I've updated the bridge, simplified a lot of code and the overal use.
I'll test it over the nest few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug-Report Confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants