]> git.plutz.net Git - lobster/commitdiff
Dirty: avoid some latex control characters
authorpaul <paul@plutz.net>
Tue, 8 Apr 2014 10:28:55 +0000 (10:28 +0000)
committerpaul <paul@plutz.net>
Tue, 8 Apr 2014 10:28:55 +0000 (10:28 +0000)
svn path=/trunk/; revision=46

actions/generate_courselist.sh

index 640e3f182e95667f3fff43d5192d7e334bfdb3a3..2b6b9ea2c7e2b36848b864c62ca0aaae36bbbfc4 100755 (executable)
@@ -9,6 +9,11 @@ fromdate=$(date -d "$fromdate" +%s)
 . ${_EXEC}/pages/courses.sh loadfunctions
 . ${_EXEC}/pages/attendees.sh loadfunctions
 
+tex_clean() { #in dire need for improvement
+  echo "$*" |tr -d '{&}\'
+}
+
+
 list_attendee() {  #Parameter: Cardfile
   id="$1"
   cardfile="$_DATA/vcard/${id}"
@@ -25,7 +30,7 @@ list_attendee() {  #Parameter: Cardfile
         if [ -z "$key" ]; then
           eval "$line"
         else
-          values[$key]="$value"
+          values[$key]="$(tex_clean "$value")"
           for t in ${(k)tag}; do
             tags[${key}_$t]="$tag[$t]"
           done
@@ -68,7 +73,7 @@ get_dates() {  #Parameter: Calendarfile
         if [ -z "$key" ]; then
           eval "$line"
         else
-          values[$key]="$value"
+          values[$key]="$(tex_clean "$value")"
           for t in ${(k)tag}; do
             tags[${key}_$t]="$tag[$t]"
           done