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

Convert relative URLs to absolute URLs #19

Open
hbostan opened this issue Feb 13, 2020 · 0 comments
Open

Convert relative URLs to absolute URLs #19

hbostan opened this issue Feb 13, 2020 · 0 comments

Comments

@hbostan
Copy link
Collaborator

hbostan commented Feb 13, 2020

Description

For telegram to render <a> tags correctly, href attribute of the tag should be an absolute url. Discrourse, however, sometimes puts relative url to the href attribute causing the text to be rendered as plain text instead of a link.

To fix this, we need to check the links to see if they are absolute links. If they are not, we then should convert them to absolute ones by prepending them with the news.host value from the config.

Relevant Files

newsparser.py

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

1 participant