Skip to content

Properly recognize and reject recursive references - #1225

Merged
LaurenzV merged 1 commit into
mainfrom
fix-recursive-references
Nov 10, 2026
Merged

LaurenzV merged 1 commit into
mainfrom
fix-recursive-references

Conversation

@LaurenzV

@LaurenzV LaurenzV commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

An attempt to handle and deal with recursive references more generally. Unlike #1219, it handles any possible references instead of just being limited to clip paths. It's quite a lot of code and I'm not entirely convinced yet whether this is the best solution we can come up with, so going to leave this PR up for 1-2 days in case there are other suggestions, but it should handle quite a lot of cases that were not properly deal with before.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now matches how Chrome also renders it.

@Its-Just-Nans

Its-Just-Nans commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Nice! That's better than #1219 !

This would prevent a circular reference. I think usvg could also have a stack overflow limit for long url() chaining (but that maybe out of scope for this PR)

related to:

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.

2 participants