From ebded2fc40c3ff2faead343b9f68d768e6db2c32 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 15 May 2022 23:50:42 -0300 Subject: social embeds (discord, maybe twitter) Tracks only for now, but more will come Soon(TM)! --- src/util/html.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/html.js b/src/util/html.js index 94756984..a9b4bb9b 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -1,7 +1,22 @@ // Some really simple functions for formatting HTML content. -// Non-comprehensive. ::::P -export const selfClosingTags = ['br', 'img']; +// COMPREHENSIVE! +// https://html.spec.whatwg.org/multipage/syntax.html#void-elements +export const selfClosingTags = [ + 'area', + 'base', + 'br', + 'col', + 'embed', + 'hr', + 'img', + 'input', + 'link', + 'meta', + 'source', + 'track', + 'wbr', +]; // Pass to tag() as an attri8utes key to make tag() return a 8lank string // if the provided content is empty. Useful for when you'll only 8e showing -- cgit 1.3.0-6-gf8a5