]> git.plutz.net Git - serve0/blobdiff - widgets.sh
Merge commit '8be698d02f663e3d88ef4c48adb00707d75eeaa4'
[serve0] / widgets.sh
index 5cd371b7e8ae47040db55a617c04fdefc3ca2f9a..f79d457303b672eeb0ea35ab00478d531dfba131 100644 (file)
@@ -14,11 +14,12 @@ c_tags="$_DATA/.index/tags.cache"; c_tagcategories="$_DATA/.index/tagcategories.
 if [ ! -s "$c_tags" -o ! -s "$c_tagcategories" ] \
    || [ "$(find "$_DATA/" -path '*/.index/meta' -newer "$c_tags")" ]
   then
-  w_tags="$( local cn=1
-    find "$_DATA/" -path '*/.index/meta' -print0 \
-    | xargs -r0 sed -r '
-      s;^.*\t.*\t.*\ttags=(.*)\tcomment=.*\t.*\r$;\1;;
-      s;,;\n;g;'"$UNSTRING" \
+  w_tags="$( cn=1
+    find "$_DATA/" -path '*/.index/meta' -exec \
+      sed -E 's;^.*\t.*\t.*\ttags=(.*)\tcomment=.*\t.*\r$;\1;;
+              s;,;\n;g;' \
+      '{}' + \
+    | UNSTRING \
     | { sort; printf '\n'; } \
     | while read -r tag; do
       [ "$tag" = "$otag" ] \
@@ -218,7 +219,7 @@ w_advsearch(){
        printf '[label [checkbox "tag_%s" "%s" %s] %s]' "$n" "$tag" "$t" "$d"
       done
       d="${f##*\$:}" d="${d%%\|*}"
-      [ "$category" = \$ ] && printf '[input name="tag_%i" value="%s"]' "$n" "$d"
+      [ "$category" = \$ ] && printf '[input name="tag_%i" value="%s"]' "$n" "$(HTML "$d")"
       printf '\n]'
     done
     printf ']'