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

mailto links inside a blog post don't work #390

Open
wioux opened this issue Dec 21, 2017 · 1 comment
Open

mailto links inside a blog post don't work #390

wioux opened this issue Dec 21, 2017 · 1 comment

Comments

@wioux
Copy link
Member

wioux commented Dec 21, 2017

When blog posts are pulled from eff.org, they are processed so that relative links to other pages on eff.org still work (the link is converted to an absolute url).

doc.css("a, img").each do |a|
if a["href"] && a["href"] !~ /^https?:\/\//
path = a["href"].sub(/^\//, "")
a["href"] = %(https://www.eff.org/#{a["href"]})
end
if a["src"] && a["src"] !~ /^https?:\/\//
path = a["src"].sub(/^\//, "")
a["src"] = %(https://www.eff.org/#{a["src"]})
end
end

A recent post contains a mailto link at the bottom which gets broken by this transformation.

@mfb
Copy link

mfb commented Dec 21, 2017

I would say the RSS feed should convert relative links to absolute, rather than the feed consumer.

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

No branches or pull requests

2 participants