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

fixed duplicate enclosure images #265

Merged
merged 4 commits into from
Jan 12, 2025

Conversation

free-bots
Copy link
Contributor

Hi, this is a fix for #206. FreshRSS has a check for duplicate urls. By adding a custom data attribute to the image FreshRSS won't render it again.

Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me

$newSrc = self::getProxyImageUri($img->getAttribute('src'));
$src = $img->getAttribute('src');
$newSrc = self::getProxyImageUri($src);
$img->setAttribute('data-xextension-imageproxy-original-src', $src);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might warrant a comment, or in any case preventing a double image from rendering isn't quite what I'd expect that to be doing.

@Alkarex Alkarex merged commit c726958 into FreshRSS:master Jan 12, 2025
1 check passed
@Alkarex
Copy link
Member

Alkarex commented Jan 12, 2025

A bit of publicity for #202 if anyone is motivated.
The ImageProxy code is severely broken + outdated and is the only extension not passing our PHPStan tests (not even at Level 2 and we are are Level 10 for the rest).

@Alkarex
Copy link
Member

Alkarex commented Jan 12, 2025

#270

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

Successfully merging this pull request may close these issues.

3 participants