Skip to content

1.2.0

Latest

Choose a tag to compare

@iantrich iantrich released this 25 Nov 05:15
24f6ca9

HTML in values renders again

Text cells now render HTML from feed values (<b>, <p>, <a>, …) as formatting, like the card did before the TypeScript rewrite. Encoded entities such as &amp; are decoded too. Fixes #92.

  • Always sanitized. Only formatting tags and the href, src, alt, title, width and height attributes are kept. Scripts, styles, event handlers and other tags are removed (their text is kept).
  • Links open in a new tab. In add_link columns, links inside the cell are removed to avoid nested links.
  • template, prefix and postfix can carry markup too, e.g. prefix: "<b>".
  • wrap_text off: block tags like <p> and <ul> display inline, so cells stay on one line.

Heads up

  • Plain text containing a bare < may now display incorrectly, since it's read as HTML.
  • The bundle is larger (~91 KB, up from ~57 KB) because it now includes DOMPurify.

Thanks

Thanks to @PacFox for reporting #92 and testing the beta.

PR: #93