]> git.plutz.net Git - confetti/blobdiff - pages/therapy.sh
cleanup of category handling
[confetti] / pages / therapy.sh
index ee9804b2f6b139227515e5bd234d08107a77e516..88855151a8fa27ea9b9f03c66694478fba47f043 100755 (executable)
@@ -29,7 +29,7 @@ tpyfile="$_DATA/therapies/$id"
 mpxfile="$_DATA/prescriptions/${id%.tpy}.mpx"
 client="$_DATA/vcard/${id%%.*}.vcf"
 
-identify "$_EXEC/templates/therapy_background.png" \
+identify "$_EXEC/static/therapy_background.png" \
 | sed -r 's;^.* ([0-9]+x[0-9]+) .*$;\1;' \
 | read bg_dim
 
@@ -46,11 +46,11 @@ client_name="${n:-${card_FN:-${card_NICK}}}"
 mpx=()
 cat "$mpxfile" |while read -r line; do
   val="${line#*:}"
-  mpx[${line%%:*}]="${val//\\n/$BR}"
+  mpx[${line%%:*}]="$(htmlsafe "${val//\\n/$BR}")"
 done
 
 tpy=()
 cat "$tpyfile" |while read -r line; do
   val="${line#*:}"
-  tpy[${line%%:*}]="${val//\\n/$BR}"
+  tpy[${line%%:*}]="$(htmlsafe "${val//\\n/$BR}")"
 done