Skip to content

Commit

Permalink
deploy: 1fe330f
Browse files Browse the repository at this point in the history
  • Loading branch information
kewisch committed Mar 26, 2024
1 parent 8739b8e commit 47009d2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api/data/search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/design.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@

let icalParams = {
// Although the syntax is DQUOTE uri DQUOTE, I don't think we should
// enfoce anything aside from it being a valid content line.
// enforce anything aside from it being a valid content line.
//
// At least some params require - if multi values are used - DQUOTEs
// for each of its values - e.g. delegated-from="uri1","uri2"
Expand Down
26 changes: 15 additions & 11 deletions api/stringify.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,23 @@
if (designSet.propertyGroups && paramName == 'group') {
continue;
}
let multiValue = (paramName in designSet.param) && designSet.param[paramName].multiValue;

let paramDesign = designSet.param[paramName];
let multiValue = paramDesign && paramDesign.multiValue;
if (multiValue && Array.isArray(value)) {
if (designSet.param[paramName].multiValueSeparateDQuote) {
multiValue = '"' + multiValue + '"';
}
value = value.map(stringify._rfc6868Unescape);
value = value.map(function(val) {
val = stringify._rfc6868Unescape(val);
val = stringify.paramPropertyValue(val, paramDesign.multiValueSeparateDQuote);
return val;
});
value = stringify.multiValue(value, multiValue, "unknown", null, designSet);
} else {
value = stringify._rfc6868Unescape(value);
value = stringify.paramPropertyValue(value);
}


line += ';' + paramName.toUpperCase();
line += '=' + stringify.propertyValue(value);
line += ';' + paramName.toUpperCase() + '=' + value;
}

if (property.length === 3) {
Expand Down Expand Up @@ -208,13 +211,14 @@
* If any of the above are present the result is wrapped
* in double quotes.
*
* @function ICAL.stringify.propertyValue
* @function ICAL.stringify.paramPropertyValue
* @param {String} value Raw property value
* @param {boolean} force If value should be escaped even when unnecessary
* @return {String} Given or escaped value when needed
*/
stringify.propertyValue = function(value) {

if ((unescapedIndexOf(value, ',') === -1) &&
stringify.paramPropertyValue = function(value, force) {
if (!force &&
(unescapedIndexOf(value, ',') === -1) &&
(unescapedIndexOf(value, ':') === -1) &&
(unescapedIndexOf(value, ';') === -1)) {

Expand Down

0 comments on commit 47009d2

Please sign in to comment.