From 523d806b5667534c94ef3b277a4646a82b3c725f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sun, 5 Apr 2020 21:33:07 +0200 Subject: [PATCH] fix: return an empty string if markup is null or undefined --- modules/core/Global.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/Global.js b/modules/core/Global.js index f976129f..41e32357 100644 --- a/modules/core/Global.js +++ b/modules/core/Global.js @@ -225,7 +225,7 @@ var encodeForm = function(text) { * The text with the tags stripped out. */ var stripTags = function (markup) { - if (markup === null) return markup; + if (!markup) return ''; var chars = String(markup).split(''); var charCounter = 0;