diff --git a/lib/ical/parse.js b/lib/ical/parse.js index 47a0805b..f933080e 100644 --- a/lib/ical/parse.js +++ b/lib/ical/parse.js @@ -388,7 +388,9 @@ parse._parseParameters = function(line, start, designSet) { } value = line.slice(valuePos, pos); lastParam = unescapedIndexOf(line, PARAM_DELIMITER, pos); - if (lastParam === -1) { + let propValuePos = unescapedIndexOf(line, VALUE_DELIMITER, pos); + // if either no next parameter or delimeter in property value, let's stop here + if (lastParam === -1 || (propValuePos !== -1 && lastParam > propValuePos)) { pos = false; } } else { diff --git a/test/parse_test.js b/test/parse_test.js index 90e79b1f..f3f012a9 100644 --- a/test/parse_test.js +++ b/test/parse_test.js @@ -226,6 +226,18 @@ suite('parserv2', function() { expected ); }); + + test('with quoted value', function() { + let input = ';FMTTYPE="text/html":Here is HTML with signs like =;'; + let expected = { + 'fmttype': 'text/html' + }; + + assert.deepEqual( + subject._parseParameters(input, 0, ICAL.design.components.vevent)[0], + expected + ); + }); }); test('#_parseMultiValue', function() {