]> git.plutz.net Git - serve0/blobdiff - widgets.sh
proper line break escape
[serve0] / widgets.sh
index 7c945d6ad3baf954928a47ab862adcca1dee5f04..f6ab6074bb1ceb5e8facbe9515d6baaa3740f894 100644 (file)
@@ -46,7 +46,7 @@ if [ ! -f "$w_tags" -o ! -f "$w_tagcategories" ] \
       }
       otag="$tag"
     done
-  } |sort -rn |cut -f2- |HTML |sed "$w_ascii s-
-\n-g; s;\n\n;\n;g;" |tee "$w_tags" )"
+  } |sort -rn |cut -f2- |HTML |sed "$w_ascii s-
-\n-g; s;\n\n;\n;g;" |tee "$w_tags" )"
   w_tagcategories="$(printf %s "$w_tags" \
                      | sed -rn '/:/s;^-?([^:]+):.*$;\1;p' |sort -u \
                      | tee "$w_tagcategories" )"
@@ -181,7 +181,7 @@ w_advsearch(){
   local n lbid tag category filter f t d
   filter="$(HTML "${FILTER}^" |sed "$w_ascii")"
 
-  printf '[form #advsearch action=?a=advsearch method=POST
+  printf '[form #advsearch action=./?a=advsearch method=POST
             [a href="#" Hide]
             [p .help Select multiple tags from each category by holding down the [strong Ctrl] key on your keyboard.[br]
             Refine the search further by setting additional search tags using the [strong "+and"] button.]'
@@ -201,7 +201,7 @@ w_advsearch(){
             $n "${t:-checked}" $n $n \
             $n "${t:+checked}" $n $n
 
-    f="|${f#~}|"
+    f="|${f#\~}|"
     printf '*\n%s\n' "$w_tagcategories" \
     | while read -r category; do
       lbid="cat_${n}_${category}"