Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/pluggableWidgets/html-element-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [1.2.3] - 2025-11-05

### Fixed

- Fixed the React unique key prop error when widget is used as non-repeated element

## [1.2.2] - 2025-03-14

### Security
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/html-element-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mendix/html-element-web",
"widgetName": "HTMLElement",
"version": "1.2.2",
"version": "1.2.3",
"description": "Displays custom HTML",
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export function HTMLElement(props: HTMLElementContainerProps): ReactElement | nu

return (
<Fragment>
{items.map(item => (
{items.map((item, index) => (
<HTMLTag
key={item?.id}
key={item?.id || index}
tagName={tag as keyof JSX.IntrinsicElements}
attributes={{
...prepareAttributes(createAttributeResolver(item), props.attributes, props.class, props.style),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("HTMLTag", () => {
});

it("with innerHTML apply html sanitizing", () => {
const checkSapshot = (html: string): void => {
const checkSnapshot = (html: string): void => {
Copy link
Author

Choose a reason for hiding this comment

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

Noticed the typo

expect(
render(
<HTMLTag
Expand All @@ -53,10 +53,10 @@ describe("HTMLTag", () => {
).toMatchSnapshot();
};

checkSapshot("<p>Lorem ipsum <script>alert(1)</script></p>");
checkSapshot("<img src=x onerror=alert(1)>");
checkSapshot(`<b onmouseover=alert(‘XSS testing!‘)>ok</b>`);
checkSapshot("<a>123</a><option><style><img src=x onerror=alert(1)></style>");
checkSnapshot("<p>Lorem ipsum <script>alert(1)</script></p>");
checkSnapshot("<img src=x onerror=alert(1)>");
checkSnapshot(`<b onmouseover=alert(‘XSS testing!‘)>ok</b>`);
checkSnapshot("<a>123</a><option><style><img src=x onerror=alert(1)></style>");
});

it("fires events", async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="HTMLElement" version="1.2.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="HTMLElement" version="1.2.3" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="HTMLElement.xml" />
</widgetFiles>
Expand Down