From 9541d33307f68dbefb979e3a070a844f2be91d19 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 10 Jul 2015 14:40:17 +0000 Subject: [PATCH] regex fixes svn path=/trunk/; revision=62 --- pages/filter.sh | 2 +- templates/filter.html.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/filter.sh b/pages/filter.sh index c19589b..9f7483c 100755 --- a/pages/filter.sh +++ b/pages/filter.sh @@ -19,7 +19,7 @@ . $_EXEC/pages/common.sh -filters="$(echo -E "$_GET[\"f\"]" |sed -r 's;^!r*\^*;;; s;\^*!*$;;; s;!+;!;g; s;\^+;^;g')" +filters="$(echo -E "$_GET[\"f\"]" |sed -r 's;^!*\^*;;; s;\^*!*$;;; s;!+;!;g; s;\^+;^;g')" debug "FILTERS: $filters" case "$1" in diff --git a/templates/filter.html.sh b/templates/filter.html.sh index 368591e..86d5b2b 100755 --- a/templates/filter.html.sh +++ b/templates/filter.html.sh @@ -1,4 +1,4 @@ -# Copyright 2014 Paul Hänsch +# Copyright 2014,2015 Paul Hänsch # # This file is part of Serve0 # @@ -34,7 +34,7 @@ cat <Up to 10 filter boxes will appear as you start selecting tags. You can select multiple tags in each box by holding down the Ctrl-key. Click the "Filter!" button when you are ready.

$(for n in {0..9}; do - filter="$(echo -E "$filters" |cut -d^ -f$(($n+1)))" + filter="$(printf '%s^' "$filters" |cut -d^ -f$(($n+1)))" fneg="${filter%%[a-zA-Z]*}" filter="${filter#!}" fcat="${filter%%:*}" -- 2.39.2