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

Add validation to link #262

Open
lissomliksom opened this issue Sep 27, 2023 · 0 comments
Open

Add validation to link #262

lissomliksom opened this issue Sep 27, 2023 · 0 comments

Comments

@lissomliksom
Copy link

Describe the bug

The "Insert Link"-option has two errors or possibly unintended behaviours:

  1. Inserting a link without text results in nothing showing. No link is inserted into the textarea. URL is required, but not Text. Consider adding required-property to text.
  2. Inserting a link without "https://" and only "www" results in broken links. Consider automatically adding "https://" if only "www" is present, or throw validation error on insert/save.

Steps to reproduce

First issue: No link insertion

  1. Click link icon
  2. Select Insert Link
  3. Add url, but no text
  4. Click insert-button

Link error #1

Second issue: www

  1. Click link icon
  2. Select Insert Link
  3. Add url starting with www
  4. Click insert-button.
  5. Preview entry and click link.

Link error #2

Craft CMS version

4.5.1

Plugin version

2.1.8

Multi-site?

No

Additional context

No response

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