Skip to content

Commit

Permalink
Add url length validation to Link at inline-tool. (#1476)
Browse files Browse the repository at this point in the history
* Add url length validation to Link at inline-tool.

fix

* simplify, add chengelog

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
  • Loading branch information
kaaaaaaaaaaai and neSpecc authored Feb 18, 2021
1 parent aa8675d commit 527ff4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- `Fix` - Fix BlockManager.setCurrentBlockByChildNode() with multiple Editor.js instances [#1503](https://github.com/codex-team/editor.js/issues/1503).
- `Fix` - Fix an unstable block cut process [#1489](https://github.com/codex-team/editor.js/issues/1489).
- `Fix` - Type definition of the Sanitizer config: the sanitize function now contains param definition [#1491](https://github.com/codex-team/editor.js/pull/1491).
- `Fix` - Fix unexpected behavior on an empty link pasting [#1348](https://github.com/codex-team/editor.js/issues/1348).

### 2.19.1

Expand Down
2 changes: 2 additions & 0 deletions src/components/inline-tools/inline-tool-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ export default class LinkInlineTool implements InlineTool {
this.unlink();
event.preventDefault();
this.closeActions();

return;
}

if (!this.validateURL(value)) {
Expand Down

0 comments on commit 527ff4e

Please sign in to comment.