vizy icon indicating copy to clipboard operation
vizy copied to clipboard

Add validation to link

Open lissomliksom opened this issue 2 years ago • 0 comments

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

lissomliksom avatar Sep 27 '23 13:09 lissomliksom