Commit 6b7e145
committed
fix(link): Don't throw exception on invalid URL href
When pasting strings with invalid URLs, `new URL()` in `renderHTML()` of
the Link extension threw an error, which made the paste parser choke.
We should catch this exception and handle it gracefully to not break
HTML parsing completely with invalid URLs.
Signed-off-by: Jonas <jonas@freesources.org>1 parent 1353d69 commit 6b7e145
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
0 commit comments