Skip to content

Fix: Prevent TypeError when link href is not a string#94

Merged
timoisik merged 1 commit into
mainfrom
fix/prevent-typeerror-on-link
Jun 12, 2026
Merged

Fix: Prevent TypeError when link href is not a string#94
timoisik merged 1 commit into
mainfrom
fix/prevent-typeerror-on-link

Conversation

@timoisik

Copy link
Copy Markdown
Contributor

isAllowedUri() passed the href straight to preg_replace/preg_match, which throw a TypeError on non-string values (e.g. an array from crafted Tiptap JSON), crashing getHTML(). Guard for non-string input and treat it as a disallowed URI.

@timoisik timoisik merged commit 74bfb7b into main Jun 12, 2026
14 checks passed
@timoisik timoisik deleted the fix/prevent-typeerror-on-link branch June 12, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant