martinrotter / rssguard

Feed reader (and podcast player) which supports RSS/ATOM/JSON and many web-based feed services.
GNU General Public License v3.0
1.64k stars 125 forks source link

[FR]: Ability to affect all image URLs in articles with Article Filters #1024

Open RetroAbstract opened 1 year ago

RetroAbstract commented 1 year ago

Brief description of the feature request

This feature would allow the user to affect the URLs of all images in articles through Article Filters. I emphasize the "all images" as it appears some image URLs can be influenced with article filters and others can't.

I have noticed that it is image URLs that are referenced at the very top of an article in the internal viewer with "[image/jpg]" (that displays the image URL it's referencing at the bottom left on the Status bar when hovering over it with the cursor) that article filters aiming to change an article's contents don't seem to apply to.

2

Using RSS Guard's releases feed as an example of article filters not affecting the image URLs in the article's content when applying the following filter:

function filterMessage() {
  msg.contents = msg.contents.replace("60", "800");
  return MessageObject.Accept;
}

1

As you can see at the bottom of the article in the internal viewer, the "60" in the image URL was not chaned by the filter, even when processing the checked feed and applying the filter to the feed prior to feed-fetching.

This is the same article used as an example in the first picture showing the "[image/jpg]" reference at the top of articles.

Image URLs that are not referenced at the top of articles with "[image/jpg]" at the top of articles change with article filters aiming to change an article's content no problem (in my experience)

Thanks

martinrotter commented 1 year ago

Yes, those images which are not affected by your fitler are actually NOT part of "contents" as they are "enclosures" (attachments) attached to the article. At this point filters do not allow to tweak existing enclosures although they allow you to add enclosures.

Theoretically, this feature could be added.