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

Pasting a link with & will is changed to & which can breaks link #4858

Closed
meghanking opened this issue Aug 25, 2021 · 6 comments · Fixed by #4910
Closed

Pasting a link with & will is changed to & which can breaks link #4858

meghanking opened this issue Aug 25, 2021 · 6 comments · Fixed by #4910
Assignees
Labels
plugin:autolink The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. support:2 An issue reported by a commercially licensed client. type:bug A bug.
Milestone

Comments

@meghanking
Copy link

meghanking commented Aug 25, 2021

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Visit CKEditor 4 demo article
  2. Copy the following link: https://www.google.com/search?q=ckeditor+4+demo&sxsrf=AOaemvIOMlAFDqLmu7CedntFOZM__buC4Q%3A1629916057505&source=hp&ei=mYsmYYbvG5H70AST5RQ&iflsig=ALs-wAMAAAAAYSaZqel7dIi7ht5uNwnupRKhKbR7VdtE&oq=ckeditor+4+demo&gs_lcp=Cgdnd3Mtd2l6EAMyBAgjECcyBQgAEIAEMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeMgYIABAWEB46BwgjEOoCECc6BQgAEJECOgQIABBDOg4ILhCABBCxAxDHARCjAjoRCC4QgAQQsQMQgwEQxwEQ0QM6CwguEIAEELEDEIMBOgoIABCxAxCDARBDOggIABCABBCxAzoLCC4QgAQQxwEQowI6CAgAELEDEIMBOgsIABCABBCxAxCDAToICC4QsQMQgwE6CAguEIAEELEDOgsIABCABBCxAxDJAzoFCAAQkgM6BwguELEDEEM6DgguEIAEELEDEIMBEJMCOgUILhCABDoFCC4QsQM6DgguEIAEELEDEMcBEK8BOgoIABCABBCHAhAUOgsILhCABBDHARDRAzoHCAAQsQMQQ1CFFVirOWDYOmgCcAB4AIABe4gB9hCSAQQxNi44mAEAoAEBsAEK&sclient=gws-wiz&ved=0ahUKEwjGn_m85szyAhWRPZQKHZMyBQAQ4dUDCAo&uact=5
  3. Paste into CKEditor

Expected result

What is the expected result of the above steps?
Recognized as a link with no changes to URL

Actual result

URL changes to the following, where "&" is replaced with "& a m p ;" (but with no spaces, but preview of this text not rendering as expected)
https://www.google.com/search?q=ckeditor+4+demo&sxsrf=AOaemvIOMlAFDqLmu7CedntFOZM__buC4Q%3A1629916057505&source=hp&ei=mYsmYYbvG5H70AST5RQ&iflsig=ALs-wAMAAAAAYSaZqel7dIi7ht5uNwnupRKhKbR7VdtE&oq=ckeditor+4+demo&gs_lcp=Cgdnd3Mtd2l6EAMyBAgjECcyBQgAEIAEMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeMgYIABAWEB46BwgjEOoCECc6BQgAEJECOgQIABBDOg4ILhCABBCxAxDHARCjAjoRCC4QgAQQsQMQgwEQxwEQ0QM6CwguEIAEELEDEIMBOgoIABCxAxCDARBDOggIABCABBCxAzoLCC4QgAQQxwEQowI6CAgAELEDEIMBOgsIABCABBCxAxCDAToICC4QsQMQgwE6CAguEIAEELEDOgsIABCABBCxAxDJAzoFCAAQkgM6BwguELEDEEM6DgguEIAEELEDEIMBEJMCOgUILhCABDoFCC4QsQM6DgguEIAEELEDEMcBEK8BOgoIABCABBCHAhAUOgsILhCABBDHARDRAzoHCAAQsQMQQ1CFFVirOWDYOmgCcAB4AIABe4gB9hCSAQQxNi44mAEAoAEBsAEK&sclient=gws-wiz&ved=0ahUKEwjGn_m85szyAhWRPZQKHZMyBQAQ4dUDCAo&uact=5
What is the actual result of the above steps?

Other details

The above change to the URL does allow for it to be navigated to, but this is not the case for our customer scenario. In our case the URL will navigate to error page because the amp; being added is unexpected

  • Browser: Chrome
  • OS: Windows
  • CKEditor version: CKEditor 4
  • Installed CKEditor plugins: link

EDIT

I have managed to reproduce this problem. When you copy actual link from the HTML page e.g. https://www.google.com/search?q=google&client=firefox-b-d then it is pasted correctly -> You will have & in wysiwyg and & in source mode.

If however you will paste the same link but you will copy it from e.g. Notepad, you will get & in wysiwyg and & in source mode which in my opinion can break the link (the actual non-working link can be found in support issue no. 70206).

obraz

obraz

@meghanking meghanking added the type:bug A bug. label Aug 25, 2021
@sculpt0r
Copy link
Contributor

sculpt0r commented Aug 27, 2021

Hi @meghanking
Just to be clear, to reproduce this - I need to copy the link address - not the casual 'copy'. It is reproducible only if you paste the raw 'address of the provided link. Second: it is converted only with autolink plugin, not the plain link plugin. The second one only allows you to add links to the content - not recognize them as a link.

So:

  • could you confirm that you are using autolink plugin, not only link plugin?
  • if it is autolink - the URL is still recognized as a link beside the ampersand encoding?

TBH: I cannot find a bug here, since the converted link is still the same valid URL. So please explain why this could be a bug and what is broken?

@meghanking
Copy link
Author

Thank you for the questions above. Happy to correct and clarify.

  • Yes, we are using autolink plugin.
  • Yes, the URL, even after the plugin adds "a m p ;" the link itself is recognized

You are correct the example URL above (the google search link) still navigates to the same experience with no issue. However, my understanding is that this is not the case for all URLs. Specifically, the URL for our scenario, the website where we host CKEditor, does not recognize the URL after "a m p ;" is added as the same experience, causing them to navigate to an error scenario.

@Comandeer
Copy link
Member

Can you provide the not working link? & should be interpreted by browser the same way as & (as it's the same character, just written as an entity).

@meghanking
Copy link
Author

I have provided examples of not working link within email thread to sla@cksource.com

I am hoping to understand if this is an issue with CKEditor 4 autolink with plans to fix, or if this is an issue with those websites not handling & within their URLs as expected.

@lslowikowska lslowikowska added the support:2 An issue reported by a commercially licensed client. label Sep 9, 2021
@sculpt0r
Copy link
Contributor

Hi @meghanking
We are able to reproduce incorrect autolink plugin behavior. This behavior seems to appear in 4.16.0, which may be related to our fixes in that version.

@sculpt0r sculpt0r added plugin:autolink The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. labels Sep 14, 2021
@jacekbogdanski jacekbogdanski self-assigned this Sep 27, 2021
@jacekbogdanski jacekbogdanski added this to the 4.17.0 milestone Sep 27, 2021
@CKEditorBot
Copy link
Collaborator

Closed in #4910

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:autolink The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. support:2 An issue reported by a commercially licensed client. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants