-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trans - reserved component keys #1304
Comments
shouldn't it be: <Trans
i18nKey="seeMore"
components={{ Link: <a href="/foo">dummy</a> }}
/> |
Tested, and the outcome is the same either way. |
You also lose the translation for the link test 🤷 |
Yes, I can confirm, this is a regression introduced by replacing html-parse-stringify... html-parse-stringify: [
{
"type": "tag",
"name": "0",
"voidElement": false,
"attrs": {},
"children": [
{
"type": "text",
"content": "click "
},
{
"type": "tag",
"name": "Link",
"voidElement": true,
"attrs": {},
"children": []
},
{
"type": "text",
"content": "here"
},
{
"type": "text",
"content": " for more"
}
]
}
] html-parse-stringify2: [
{
"type": "tag",
"name": "0",
"voidElement": false,
"attrs": {},
"children": [
{
"type": "text",
"content": "click "
},
{
"type": "tag",
"name": "Link",
"voidElement": false,
"attrs": {},
"children": [
{
"type": "text",
"content": "here"
}
]
},
{
"type": "text",
"content": " for more"
}
]
}
] |
@HenrikJoreteg this is the original "issue" |
@adrai |
fixed with v11.8.14 |
💥 Regression Report
While it's acknowledged in the docs that self-closing html tags such as
link
andimg
are reserved and cannot be used as keys in thecomponents
prop, previously using a capitalized version such asLink
worked fine. In the newest version (I'm guessing due to the change in html-parse-stringify? #1283), it no longer works as expected. It seems this is a breaking regression (happened in one of our apps), but I'm not sure if there was ever an intended support for this. At the least, may be worth mentioning in the changelog.Last working version
Worked up to version: 11.8.12
Stopped working in version: 11.8.13
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected:
Actual:
Your Environment
The text was updated successfully, but these errors were encountered: