Skip to content

Commit be2bb13

Browse files
committed
was the previous commit sane? This should be thought better through
1 parent 0625a99 commit be2bb13

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎caldav/compatibility_hints.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class FeatureSet:
117117
"search.category": {
118118
"description": "Search for category should work. This is not explicitly specified in RFC4791, but covered in section 9.7.5. No examples targets categories explicitly, but there are some text match examples in section 7.8.6 and following sections"},
119119
"search.category.fullstring": {
120-
"description": "searches on the full string categories. Meaning that a search for `category='hands,feet,head'` will match if categories is set so, but it may not necessary match with `CATEGORIES:head,feet,hands`"},
120+
"description": "searches on the full string categories. Meaning that a search for `category='hands,feet,head'` will match if categories is set so, but it may not necessary match with `CATEGORIES:head,feet,hands` - TODO: Is this a feature or a bug? It may need reconsidering. A comma-delimited string basically means that a field has multiple values? Ref RFC5545, section 3.3.11."},
121121
"search.category.fullstring.smart": {
122122
"description": "For an event with `CATEGORIES:hands,feet,head` we'll also get a match when searching for \"feet,hands,head\""
123123
},

‎caldav/search.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ def build_search_xml_query(
451451
if self._property_operator[property] == "undef":
452452
match = cdav.NotDefined()
453453
else:
454+
## Perhaps this replacement is wrong.
455+
## Ref RFC5545 section 3.3.11, the comma (without backslash)
456+
## basically means the text field should be considered to contain
457+
## multiple values
454458
## TODO - TODO - TODO ... this replace-logic is weird, there may be other
455459
## dragons here
456460
match = cdav.TextMatch(self._property_filters[property].to_ical().replace(b'\\,',b','))

0 commit comments

Comments
 (0)