fix: replacing .png inside the component params#493
Merged
harlan-zw merged 1 commit intonuxt-modules:mainfrom Mar 10, 2026
Merged
fix: replacing .png inside the component params#493harlan-zw merged 1 commit intonuxt-modules:mainfrom
harlan-zw merged 1 commit intonuxt-modules:mainfrom
Conversation
Collaborator
|
Great catch, thank you |
Contributor
Author
|
Thanks for the quick merge! When do you think you'll release these changes? :-) |
Collaborator
|
It's out now :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❓ Type of change
📚 Description
context.ts uses String.replace() to strip the output format extension (.png, .html, etc.) from the URL path before parsing encoded params. String.replace() only replaces the first occurrence, so when a prop value contains the same extension as the output format (e.g. orgLogo=https://example.com/logo.png with a .png output), the extension inside the prop value gets stripped instead of the trailing one.
This results in broken prop values (e.g. logo.png becomes logo) and corrupted downstream params.
Fix: Replace String.replace() with a regex anchored to the end of the string ($), matching the approach already used in urlEncoding.ts's parseOgImageUrl().