| while read attachment; do
case $attachment in
*/*)
- printf '<a href="%s"><img src="%s"></a>' \
- "${attachment%/*}/[attachment]/${attachment##*/}" "${attachment}"
+ printf '<a href="%s"><img alt="" src="%s"></a>' \
+ "$(URL "${attachment%/*}/[attachment]/${attachment##*/}")" \
+ "$(URL "${attachment}")"
;;
*)
- printf '<a href="%s"><img src="%s"></a>' \
- "[attachment]/${attachment}" "${attachment}"
+ printf '<a href="%s"><img alt="" src="%s"></a>' \
+ "$(URL "[attachment]/${attachment}")" \
+ "$(URL "${attachment}")"
;;
esac
done