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

Allow http or nothing in forum links #364

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

HebaruSan
Copy link
Contributor

Problem

In #331, we added automatic parsing of forum links on the profile page to make them more easily clickable.

However, thanks to #345, we are able to easily jump back to the very earliest accounts, which predate the ubiquity of HTTPS on the interwebs, so their forum links start with http://:

One user even left off that part of the URL completely:

Currently these profiles do not benefit from the parsing and formatting of #331.

Cause

The regex for parsing the links starts with https. This is unnecessarily restrictive.

Changes

Now the regex allows http:// links or just forum....

@HebaruSan

This comment has been minimized.

@HebaruSan HebaruSan force-pushed the fix/old-forum-links branch 2 times, most recently from 65ca4b0 to e612e37 Compare June 28, 2021 20:09
@HebaruSan HebaruSan changed the base branch from master to alpha June 28, 2021 20:27
@HebaruSan
Copy link
Contributor Author

OK, I tested the "http://", "https://", and "nothing" case, and all three gave me working links to the forum. If there was a problem with the "nothing" case previously, it wasn't what I thought now.

@HebaruSan HebaruSan force-pushed the fix/old-forum-links branch 2 times, most recently from 6244350 to d41b0c5 Compare June 30, 2021 20:28
Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

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

Works like a charm now, thanks a bunch.

@DasSkelett DasSkelett merged commit 1a147b6 into KSP-SpaceDock:alpha Jul 2, 2021
@HebaruSan HebaruSan deleted the fix/old-forum-links branch July 2, 2021 16:04
This was referenced Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Backend Related to the Python code that runs inside gunicorn Priority: Low Status: Ready Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants