prevent faulty form fill in bookmark editor
authorpaul <paul@plutz.net>
Mon, 12 Mar 2018 12:33:42 +0000 (12:33 +0000)
committerpaul <paul@plutz.net>
Mon, 12 Mar 2018 12:33:42 +0000 (12:33 +0000)
svn path=/trunk/; revision=160

actions/update_bookmarks.sh
templates/frame.html.sh

index 6a17d04..68fd5ab 100755 (executable)
@@ -30,5 +30,4 @@ case "${_POST[submit]}" in
     ;;
 esac
 
-
 redirect "${url}"
index db31ad8..90e0e32 100755 (executable)
@@ -50,7 +50,9 @@ cat <<EOF
           printf '<input type="hidden" name="bm_url" value="%s" />
                   <input type="text" name="bm_name" value="%s" readonly="readonly" /
                   ><button type="submit" name="submit" value="del">%s</button>' \
-                  "$(attribsafe ${REQUEST_URI})" "$(attribsafe $(grep -F "$REQUEST_URI " "$bmfile" |sed -r 's;.*\t;;'))" "$(l10n bm_del)"
+                  "$(attribsafe ${REQUEST_URI})" \
+                  "$(attribsafe $(grep -m1 -F "$REQUEST_URI    " "$bmfile" |sed -r 's;.*\t;;'))" \
+                  "$(l10n bm_del)"
         else
           printf '<input type="hidden" name="bm_url" value="%s" />
                   <input type="text" name="bm_name" placeholder="%s" /