vizy
vizy copied to clipboard
Add validation to link
Describe the bug
The "Insert Link"-option has two errors or possibly unintended behaviours:
- 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.
- 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
- Click link icon
- Select Insert Link
- Add url, but no text
- Click insert-button
Second issue: www
- Click link icon
- Select Insert Link
- Add url starting with www
- Click insert-button.
- Preview entry and click link.
Craft CMS version
4.5.1
Plugin version
2.1.8
Multi-site?
No
Additional context
No response