@miso.ai/client-sdk-ui 1.9.3-beta.1 → 1.9.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/layout/text/text.js +2 -1
- package/dist/cjs/version.js +1 -1
- package/package.json +2 -2
- package/src/layout/text/text.js +2 -1
- package/src/version.js +1 -1
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _commons = require("@miso.ai/commons");
|
|
7
8
|
var _constants = require("../../constants.js");
|
|
8
9
|
var _template = _interopRequireDefault(require("../template.js"));
|
|
9
10
|
const _excluded = ["className", "templates", "tag"];
|
|
@@ -20,7 +21,7 @@ function root(layout, state) {
|
|
|
20
21
|
}
|
|
21
22
|
} = layout;
|
|
22
23
|
const roleAttr = role ? `data-role="${role}"` : '';
|
|
23
|
-
return `<${tag} class="${className}" ${roleAttr}>${state.value || ''}</${tag}>`;
|
|
24
|
+
return `<${tag} class="${className}" ${roleAttr}>${(0, _commons.escapeHtml)(state.value || '')}</${tag}>`;
|
|
24
25
|
}
|
|
25
26
|
const DEFAULT_TEMPLATES = Object.freeze({
|
|
26
27
|
root
|
package/dist/cjs/version.js
CHANGED
package/package.json
CHANGED
package/src/layout/text/text.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '@miso.ai/commons';
|
|
1
2
|
import { LAYOUT_CATEGORY } from '../../constants.js';
|
|
2
3
|
import TemplateBasedLayout from '../template.js';
|
|
3
4
|
|
|
@@ -7,7 +8,7 @@ const DEFAULT_CLASSNAME = 'miso-text';
|
|
|
7
8
|
function root(layout, state) {
|
|
8
9
|
const { className, role, options: { tag } } = layout;
|
|
9
10
|
const roleAttr = role ? `data-role="${role}"` : '';
|
|
10
|
-
return `<${tag} class="${className}" ${roleAttr}>${state.value || ''}</${tag}>`;
|
|
11
|
+
return `<${tag} class="${className}" ${roleAttr}>${escapeHtml(state.value || '')}</${tag}>`;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const DEFAULT_TEMPLATES = Object.freeze({
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.9.
|
|
1
|
+
export default '1.9.4-beta.0';
|