fix: return an empty string if markup is null or undefined

This commit is contained in:
Tobi Schäfer 2020-04-05 21:33:07 +02:00
parent c984d3c4a2
commit 523d806b56

View file

@ -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;