category="$(validate "${_POST[category$fn]}" '[[:alnum:]_-]+' none)"
n=''; while [ -n "${_POST[cfilter${fn}_$n]}" ]; do
- cfilter="$(validate "${_POST[cfilter${fn}_$n]}" '[[:alnum:]\?!\._=\(\)+-]+' '#')"
+ #cfilter="$(validate "${_POST[cfilter${fn}_$n]}" '[[:alnum:]\?!\._=\(\)+-]+' '#')"
+ cfilter="${_POST[cfilter${fn}_$n]}"
if [ -z "$n" ]; then
[ -n "$filters" ] && filters="${filters}^"
trash="${_POST[trash]}"
cancel="${_POST[cancel]}"
tagacc="${_POST[tag]}"
-tags="$(htmlsafe "${_POST[tags]}" |sed -r 's:\t| :_:g;s:^!|\r|\$|\^::g;' |tr '\n' '|')"
+tags="$(htmlsafe "${_POST[tags]}" |sed -r 's:\t: :g;s:^!|[\r\$\^\|]::g;' |tr '\n' '|')"
description="$(htmlsafe "${_POST[description]}")"
n=0; while [ -n "${_POST[tag$n]}" ]; do
done
htmlsafe "${_POST[tags]}"
printf \\n
- ) |sed -r 's:\t| :_:g;s:^!|\r|\$|\^::g;' \
+ ) | sed -r 's:\t: :g;s:^!|[\r\$\^\|]::g;' \
| while read tag; do
addtag "${_DATA}/meta/$tagsel.meta" "$tag"
done
}
thumblist() {
- cache="${_DATA}/cache/${pagesize}?o=${order}&s=${search}&f=${filter}&pn=${page}"
+ cachebase="${pagesize}?o=${order}&s=${search//\//}&f=${filter//\//}&pn=${page}"
+ cache="${_DATA}/cache/${cachebase}"
if [ "$cache" -nt ${_DATA}/videos -a "$cache" -nt ${_DATA}/meta ]; then
cat "$cache"
else
filterex="s;^([0-9]+\t){3}(.+)\n.*$;\2;p"
printf '%s\n' "$filter" |tr '^' '\n' \
+ | sed -r 's;[]\/\(\)\\\^\$\|\?\.\+\*\;\[\{\}];\\\\&;g' \
| while read each; do
[ "${each:0:1}" = '!' ] && filterex="/^[^\n]+\n(.*\|)?(${each#?})(\|.*)?$/d;{${filterex}}" \
|| filterex="/^[^\n]+\n(.*\|)?(${each})(\|.*)?$/{${filterex}}"