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

Bug 1841025: Disable linkify fuzzy links #5800

Merged
merged 1 commit into from Jul 23, 2020

Conversation

TheRealJon
Copy link
Member

@TheRealJon TheRealJon commented Jun 22, 2020

Only linkify url strings that begin with a protocol scheme.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jun 22, 2020
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: This pull request references Bugzilla bug 1841025, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1841025: Improve LinkifyExternal component

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the component/shared Related to console-shared label Jun 22, 2020
children,
fuzzyEmail = true, // recognize emails without mailto: prefix. Default true.
fuzzyIP = false, // allow IPs in fuzzy links above. Can conflict with some texts like version numbers. Default false.
fuzzyLink = true, // recognize URL-s without http(s):// head. Default true.
Copy link
Member

Choose a reason for hiding this comment

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

We might want to just turn this off entirely (or at least default to false). I suspect we will have the same problem in other contexts with image pull specs.

fuzzyIP = false, // allow IPs in fuzzy links above. Can conflict with some texts like version numbers. Default false.
fuzzyLink = true, // recognize URL-s without http(s):// head. Default true.
}) => {
linkify.set({ fuzzyEmail, fuzzyIP, fuzzyLink });
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this will work correctly. This is setting the global configuration. If there are two components with different configuration, you don't know what you'll get.

@TheRealJon
Copy link
Member Author

@spadgett We could disable the fuzzyLink option globally, which will prevent links that don't include a protocol. This solves the specific issue in the related bug, but I feel like we will still have issues where 'invalid' urls can be linkified. Correctly formatted text that may not be a resolvable url, like https://my.api.io/{type}/{id} will still be turned into a dead-end hyperlink.

@spadgett
Copy link
Member

@spadgett We could disable the fuzzyLink option globally, which will prevent links that don't include a protocol. This solves the specific issue in the related bug, but I feel like we will still have issues where 'invalid' urls can be linkified. Correctly formatted text that may not be a resolvable url, like https://my.api.io/{type}/{id} will still be turned into a dead-end hyperlink.

I'm not sure what we can do about that except not linkify :/ Are there any common cases you're aware of where this happens?

I'd vote for just disabling fuzzyLink everywhere.

Only linkify url strings that begin with a protocol scheme.
@TheRealJon
Copy link
Member Author

TheRealJon commented Jul 21, 2020

@spadgett Updated according to your feedback. Sorry, this kinda fell off my radar 😆

@openshift-ci-robot
Copy link
Contributor

@TheRealJon: This pull request references Bugzilla bug 1841025, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1841025: Improve LinkifyExternal component

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@TheRealJon TheRealJon changed the title Bug 1841025: Improve LinkifyExternal component Bug 1841025: Disable linkify fuzzy links Jul 21, 2020
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spadgett, TheRealJon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 23, 2020
@openshift-merge-robot openshift-merge-robot merged commit 9842125 into openshift:master Jul 23, 2020
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: All pull requests linked via external trackers have merged: openshift/console#5800. Bugzilla bug 1841025 has been moved to the MODIFIED state.

In response to this:

Bug 1841025: Disable linkify fuzzy links

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@spadgett spadgett added this to the v4.6 milestone Jul 28, 2020
@TheRealJon TheRealJon deleted the 1841025-bz branch January 28, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality component/shared Related to console-shared lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants