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

fix(LongUrlEditor): strip protocol from long URL #1293

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

zwliew
Copy link
Contributor

@zwliew zwliew commented Mar 11, 2021

Problem

When editing the long URL in LongUrlEditor, the protocol is not automatically stripped. This behaviour does not match that of the link creation modal.

Closes #1092

Solution

Bug Fixes:

  • Strip the protocol from the long URL before updating the state of the LongUrlEditor.

Tests

Protocol should be stripped when editing the long URL in LongUrlEditor:

  1. Deploy the change
  2. Change the long URL of an existing link to one prefixed with http:// or https://
  3. The prefix should be automatically stripped

Copy link
Contributor

@LoneRifle LoneRifle left a comment

Choose a reason for hiding this comment

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

lgtm

@LoneRifle LoneRifle merged commit 06c91ca into opengovsg:develop Mar 11, 2021
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

Successfully merging this pull request may close these issues.

When pasting a link in update link field in the drawer, https:// is not stripped
2 participants