-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Description
Describe the bug
Currently we use node.textContent to determine whether a paragraph is a link that warrants a link preview. Instead, we should check whether the paragraph has a link mark and use its href.
Reasons for this change would be:
- We would make sure to always show the preview of the link target, not of the description text. Both may differ, which has security implications.
- Links with a custom description would get a link preview as well.
- Apparently url-encoded spaces in
textContentof links get decoded when transformed to markdown. Spaces are not regarded in the regex that checks for URLs. Therefore URLs with spaces loose their link preview once the Text session is closed.
I'll take a look into implementing this change.
@julien-nc would be interested in your opinion on that.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
☑️ Done