From 0e0e7e6828d5bb00ed610134d8a31dc0b40ae791 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 12 Oct 2017 16:34:42 +0000 Subject: [PATCH] escape " for latex svn path=/trunk/; revision=156 --- actions/generate_courselist.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/actions/generate_courselist.sh b/actions/generate_courselist.sh index 5fbbc28..d777536 100755 --- a/actions/generate_courselist.sh +++ b/actions/generate_courselist.sh @@ -1,6 +1,6 @@ #!/bin/zsh -# Copyright 2014, 2016 Paul Hänsch +# Copyright 2014, 2016, 2017 Paul Hänsch # # This file is part of Confetti. # @@ -27,7 +27,7 @@ fromdate="$(date -d "$fromdate" +%s)" 2>/dev/null . ${_EXEC}/pages/cards.sh tex_clean() { #in dire need for improvement - printf %s "$*" |tr -d '{&}\\' + printf %s "$*" |tr -d '{&}\\"' } @@ -48,15 +48,15 @@ list_attendee() { #Parameter: Cardfile tel='' for n in TEL TEL{0..10}; do if (echo "$values[$n]" |grep -Eq '[0-9]'); then - [ -n "$tel" ] && tel="$tel\\newline $values[$n]" || tel="$values[$n]" + [ -n "$tel" ] && tel="$tel\\newline $(tex_clean "$values[$n]")" || tel="$(tex_clean "$values[$n]")" fi; done note='' for n in NOTE NOTE{0..10}; do if [ -n "$values[$n]" ]; then - [ -n "$note" ] && note="$note\\newline $values[$n]" || note="$values[$n]" + [ -n "$note" ] && note="$note\\newline $(tex_clean "$values[$n]")" || note="$(tex_clean "$values[$n]")" fi; done printf '%s & %s & %s & %s\n' \ - "$(tex_clean $fullname)" "$(tex_clean $values[BDAY])" "$(tex_clean $tel)" "$(tex_clean $note)" \ + "$(tex_clean $fullname)" "$(tex_clean $values[BDAY])" "$tel" "$note" \ | sed -r ':X;N;$!bX; s;\n;\\newline ;g' fi } -- 2.39.2