src/vs/base/browser/dom.ts/_extInsaneOptions
function _extInsaneOptions(opts: InsaneOptions, allowedAttributesForAll: string[]): InsaneOptions {

	let allowedAttributes: Record<string, string[]> = opts.allowedAttributes ?? {};

	if (opts.allowedTags) {
		for (let tag of opts.allowedTags) {
			let array = allowedAttributes[tag];
			if (!array) {
				array = allowedAttributesForAll;
			} else {
				array = array.concat(allowedAttributesForAll);
			}
			allowedAttributes[tag] = array;
		}
	}

	return { ...opts, allowedAttributes };
}