From dcaa0195992d8ca70f72dfd068b29b1e49679186 Mon Sep 17 00:00:00 2001 From: rugk Date: Mon, 23 Feb 2026 16:36:46 +0100 Subject: [PATCH] refactor: use modern spread syntax for combining object Given it's 2026 this really should be supported by all browsers now: https://caniuse.com/mdn-javascript_operators_spread,mdn-javascript_operators_spread_spread_in_arrays,mdn-javascript_operators_spread_spread_in_function_calls,mdn-javascript_operators_spread_spread_in_object_literals --- js/privatebin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/privatebin.js b/js/privatebin.js index 58482b40..7d8ce842 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -812,7 +812,8 @@ jQuery.PrivateBin = (function($) { if (containsHtml) { // only allow tags/attributes we actually use in translations - const sanitizeConfig = Object.assign({}, purifyHtmlConfig, { + const sanitizeConfig = { + ...purifyHtmlConfig, ALLOWED_TAGS: ['a', 'i', 'span', 'kbd'], ALLOWED_ATTR: ['href', 'id'] });