aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-05-17 01:55:20 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2021-05-17 01:55:20 +0200
commit897a19ceb592e3fed5f6ea81f83ac051f4eaaef3 (patch)
tree6694e86166766b74db1d5dd9686707c1b894f950
parentFix & not becoming &amp; in XML. (diff)
downloadcalp-897a19ceb592e3fed5f6ea81f83ac051f4eaaef3.tar.gz
calp-897a19ceb592e3fed5f6ea81f83ac051f4eaaef3.tar.xz
Fix & not becoming &amp; in XML.
-rw-r--r--static/vcal.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/static/vcal.js b/static/vcal.js
index 0601d714..f86d53de 100644
--- a/static/vcal.js
+++ b/static/vcal.js
@@ -112,12 +112,12 @@ class VComponent {
switch (type) {
case 'float':
case 'integer':
- parsedValue = Number(s.innerHTML);
+ parsedValue = Number(s.textContent);
break;
case 'date-time':
case 'date':
- parsedValue = parseDate(s.innerHTML);
+ parsedValue = parseDate(s.textContent);
break;
/* TODO */
@@ -125,12 +125,12 @@ class VComponent {
let start = s.getElementsByTagName('start');
let end = s.getElementsByTagName('end, duration');
if (end.tagName === 'period') {
- parsePeriod(end.innerHTML);
+ parsePeriod(end.textContent);
}
break;
/* TODO */
case 'period':
- parsedValue = parsePeriod(s.innerHTML);
+ parsedValue = parsePeriod(s.textContent);
break;
/* TODO */
case 'utc-offset':
@@ -141,7 +141,7 @@ class VComponent {
break;
case 'boolean':
- switch (s.innerHTML) {
+ switch (s.textContent) {
case 'true': parsedValue = true; break;
case 'false': parsedValue = false; break;
default: throw "Value error"
@@ -155,12 +155,12 @@ class VComponent {
case 'cal-address':
case 'text':
case 'uri':
- parsedValue = s.innerHTML;
+ parsedValue = s.textContent;
// parsedValue.type = type;
break;
default:
- parsedValue = s.innerHTML;
+ parsedValue = s.textContent;
}