@kubex/zinc 1.1.91 → 1.1.92

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.1.91",
3
+ "version": "1.1.92",
4
4
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
5
5
  "keywords": [
6
6
  "web components",
@@ -4,6 +4,7 @@ import {HasSlotController} from "../../internal/slot";
4
4
  import {html, unsafeCSS} from 'lit';
5
5
  import {MutationController} from '@lit-labs/observers/mutation-controller.js';
6
6
  import {property, queryAssignedNodes, queryAsync, state} from 'lit/decorators.js';
7
+ import {unsafeHTML} from 'lit-html/directives/unsafe-html.js';
7
8
  import ZincElement from "../../internal/zinc-element";
8
9
  import type {PropertyValues} from 'lit';
9
10
  import type ZnTile from "../tile";
@@ -279,7 +280,7 @@ export default class ContentBlock extends ZincElement {
279
280
  'text-section--text': section.type === 'text',
280
281
  'hidden': section.type === 'reply'
281
282
  })}>
282
- ${section.lines.map((line) => html`${line}<br>`)}
283
+ ${section.lines.map((line) => html`${unsafeHTML(line)}<br>`)}
283
284
  </div>
284
285
  `)}
285
286
  </div>
@@ -374,7 +375,7 @@ export default class ContentBlock extends ZincElement {
374
375
  const textRows: TextRow[] = [];
375
376
 
376
377
  if (textContent) {
377
- const text = textContent.innerText.replace(/<br\s*\/?>/gi, '\n');
378
+ const text = textContent.innerText;
378
379
  const rows = text.split('\n');
379
380
  let previousType: TextRow['type'] | null = null;
380
381
  let forceReply = false;