summaryrefslogtreecommitdiff
path: root/model_fs.js
diff options
context:
space:
mode:
authorBenjamin Kiessling <mittagessen@l.unchti.me>2012-01-21 01:38:02 +0100
committerBenjamin Kiessling <mittagessen@l.unchti.me>2012-01-21 01:38:02 +0100
commit192c9d79ae7b0861918cbcf484d947589d35b663 (patch)
tree2dcc182aedf50a9bf2053c9b468e69ad7201ca33 /model_fs.js
parent77ccd4f9e6ff6bd43eb151e6f15e4c738ddcf8a7 (diff)
Replace newlines and escaped commas with their html equivalent
Diffstat (limited to 'model_fs.js')
-rw-r--r--model_fs.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/model_fs.js b/model_fs.js
index e90b1a0..a4d2bef 100644
--- a/model_fs.js
+++ b/model_fs.js
@@ -115,6 +115,12 @@ exports.rebuildFiles = function() {
delete ev.rrule;
delete ev.uid;
delete ev.type;
+ for(var i in ev) {
+ if(!ev.hasOwnProperty(i)) { continue; }
+ if(typeof ev[i] != 'string') { continue; }
+ ev[i] = ev[i].replace(/\\,/g, ',');
+ ev[i] = ev[i].replace(/\\n/g, '<br />');
+ }
if(typeof compEv[dateStr] == "undefined") {
compEv[dateStr] = [];
}