From 38baa8edbe18bf20fa6dda3dff66d8ddea23cad3 Mon Sep 17 00:00:00 2001 From: rugk Date: Sun, 1 Mar 2026 15:04:22 +0000 Subject: [PATCH] wipfix(i18n): make sure to check for string Likely introdued in https://github.com/PrivateBin/PrivateBin/pull/1730 --- js/privatebin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 0ca9fc13..8950fd08 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -943,18 +943,20 @@ window.PrivateBin = (function () { }; /** - * Check if string contains valid HTML code + * Check if string contains valid HTML code. + * + * If it is no string at all, this always returns false for compatibility. * * @name I18n.isStringContainsHtml * @function * @private - * @param {string} messageId + * @param {string|object} messageId * @returns {boolean} */ function isStringContainsHtml(messageId) { // message IDs are allowed to contain anchors, spans, keyboard and emphasis tags // we can recognize all of them by only checking for anchors and keyboard tags - return messageId.indexOf('