diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-12 00:13:02 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-12 00:13:02 +0200 |
commit | da8d1467dff8b27af7a3ae649d92ead5cbf704d8 (patch) | |
tree | cd4231abb8ec24d79dd3a4a8b5e563ee2bb82219 /static/vevent.ts | |
parent | Add number of TODO's. (diff) | |
parent | Handle error for user-additions salar. (diff) | |
download | calp-da8d1467dff8b27af7a3ae649d92ead5cbf704d8.tar.gz calp-da8d1467dff8b27af7a3ae649d92ead5cbf704d8.tar.xz |
Allow HTML output of all routes.
XHTML is still the far supperior format. However; Chrome(-like) browsers
Lighthouse feature is worth quite a bit when it comes to ensuring a good
web page, and Lighthouse refuses to work on anything except text/html.
This is my work-around for that.
Diffstat (limited to '')
-rw-r--r-- | static/vevent.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/static/vevent.ts b/static/vevent.ts index 56c9019a..5419eb60 100644 --- a/static/vevent.ts +++ b/static/vevent.ts @@ -298,7 +298,7 @@ function make_vevent_value(value_tag: Element): VEventValue { /* TODO parameters */ return new VEventValue( /* TODO error on invalid type? */ - value_tag.tagName as ical_type, + value_tag.tagName.toLowerCase() as ical_type, make_vevent_value_(value_tag)); } @@ -441,7 +441,7 @@ function xml_to_recurrence_rule(xml: Element): RecurrenceRule { function make_vevent_value_(value_tag: Element): string | boolean | Date | number | RecurrenceRule { /* RFC6321 3.6. */ - switch (value_tag.tagName) { + switch (value_tag.tagName.toLowerCase()) { case 'binary': /* Base64 to binary Seems to handle inline whitespace, which xCal standard reqires @@ -518,10 +518,10 @@ function xml_to_vcal(xml: Element): VEvent { for (var j = 0; j < tag.childElementCount; j++) { let child = tag.childNodes[j]; if (!(child instanceof Element)) continue; - if (child.tagName == 'parameters') { + if (child.tagName.toLowerCase() == 'parameters') { parameters = /* TODO handle parameters */ {}; continue value_loop; - } else switch (tag.tagName) { + } else switch (tag.tagName.toLowerCase()) { /* These can contain multiple value tags, per RFC6321 3.4.1.1. */ case 'categories': @@ -535,7 +535,7 @@ function xml_to_vcal(xml: Element): VEvent { value = make_vevent_value(child); } } - property_map.set(tag.tagName, value); + property_map.set(tag.tagName.toLowerCase(), value); } } |