[GH-ISSUE #169] Some relative links don't get rewritten #35

Closed
opened 2026-09-29 12:58:52 +00:00 by slurdge · 8 comments
Owner

Originally created by @Cyberbeni on GitHub (Oct 18, 2023).
Original GitHub issue: https://github.com/slurdge/goeland/issues/169

Describe the bug
Relative links in certain RSS feeds don't get rewritten

To Reproduce

  1. Generate email from the following feeds:
  1. Click on links in emails

Expected behavior
Relative links in the linked rss feed get rewritten

Originally created by @Cyberbeni on GitHub (Oct 18, 2023). Original GitHub issue: https://github.com/slurdge/goeland/issues/169 **Describe the bug** Relative links in certain RSS feeds don't get rewritten **To Reproduce** 1. Generate email from the following feeds: - https://developer.apple.com/news/releases/rss/releases.rss - https://swordscomic.com/comic/feed/ 2. Click on links in emails **Expected behavior** Relative links in the linked rss feed get rewritten
Author
Owner

@Cyberbeni commented on GitHub (Oct 19, 2023):

I found out that you can specify the base url for relative links, which should be more robust than trying to regex all the possible ways to write relative links:

<base href="https://developer.apple.com" />
<!-- gh-comment-id:1771406773 --> @Cyberbeni commented on GitHub (Oct 19, 2023): I found out that you can specify the base url for relative links, which should be more robust than trying to regex all the possible ways to write relative links: ``` <base href="https://developer.apple.com" /> ```
Author
Owner

@slurdge commented on GitHub (Oct 27, 2023):

I'll look into it. You suggest that goeland manually put the base into the email right ?

<!-- gh-comment-id:1782923427 --> @slurdge commented on GitHub (Oct 27, 2023): I'll look into it. You suggest that goeland manually put the `base` into the email right ?
Author
Owner

@Cyberbeni commented on GitHub (Oct 27, 2023):

I currently use different templates for this. Using base doesn't work if multiple feeds are merged and would need different base urls, so I don't know what would be the best solution.

<!-- gh-comment-id:1782931972 --> @Cyberbeni commented on GitHub (Oct 27, 2023): I currently use different templates for this. Using `base` doesn't work if multiple feeds are merged and would need different base urls, so I don't know what would be the best solution.
Author
Owner

@slurdge commented on GitHub (Oct 27, 2023):

You are right, and even Gmail&Hotmail would filter out the base. I've added an additional rule into the "links" filter, that rewrite src&href with the correct base URL. It works in your two examples, so let's cross fingers some strange feeds won't pop out.

<!-- gh-comment-id:1782981467 --> @slurdge commented on GitHub (Oct 27, 2023): You are right, and even Gmail&Hotmail would filter out the base. I've added an additional rule into the "links" filter, that rewrite src&href with the correct base URL. It works in your two examples, so let's cross fingers some strange feeds won't pop out.
Author
Owner

@slurdge commented on GitHub (Oct 27, 2023):

Please try 0.16.0 and tell me if the situation is better :)

<!-- gh-comment-id:1783033057 --> @slurdge commented on GitHub (Oct 27, 2023): Please try 0.16.0 and tell me if the situation is better :)
Author
Owner

@Cyberbeni commented on GitHub (Oct 27, 2023):

The newest ghcr.io docker image is still 0.15.0

edit: the build is still in progress: https://github.com/slurdge/goeland/actions/runs/6668620883/job/18124562936

<!-- gh-comment-id:1783041911 --> @Cyberbeni commented on GitHub (Oct 27, 2023): The newest ghcr.io docker image is still 0.15.0 edit: the build is still in progress: https://github.com/slurdge/goeland/actions/runs/6668620883/job/18124562936
Author
Owner

@slurdge commented on GitHub (Oct 27, 2023):

My bad, action is still running :)

<!-- gh-comment-id:1783043791 --> @slurdge commented on GitHub (Oct 27, 2023): My bad, action is still running :)
Author
Owner

@Cyberbeni commented on GitHub (Oct 27, 2023):

It seems to be working correctly

<!-- gh-comment-id:1783068510 --> @Cyberbeni commented on GitHub (Oct 27, 2023): It seems to be working correctly
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: slurdge/goeland#35
No description provided.