. $_EXEC/cards/widgets.sh
. $_EXEC/cards/list.sh
-unescape() { [ $# = 0 ] && sed -E 's;\\(.);\1;g' || printf %s "$*" |sed -E 's;\\(.);\1;g'; }
upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; '
filter="$(GET f)"
. $_EXEC/courses/widgets.sh
. $_EXEC/courses/list.sh
-unescape() { [ $# = 0 ] && sed -E 's;\\(.);\1;g' || printf %s "$*" |sed -E 's;\\(.);\1;g'; }
upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; '
order="$(GET o |grep -m1 -xE 'DOW|TOD')"
BR='
'
+unescape() {
+ local unescape='s;(^(\\\\)*|[^\\](\\\\)*)\\n;\1\n;g; s;\\(.);\1;g'
+ if [ $# -eq 0 ]; then
+ sed -E "$unescape"
+ else
+ printf %s "$*" \
+ | sed -E "$unescape"
+ fi
+}
+
pdi_load() {
# normalise PDI file for processing with pdi_* functions
# functions in this library can only be applied to normalised data