aboutsummaryrefslogtreecommitdiff
path: root/utils/handle-post-upload.sh
diff options
context:
space:
mode:
authorJefferson Julio <[email protected]>2021-06-02 23:38:09 -0300
committerJefferson Julio <[email protected]>2021-06-02 23:38:09 -0300
commit7d773221e7711c4e534e89264c719b4cc5aabb1f (patch)
treebaf59501215d3ee874b865c70c9b9d1408545a16 /utils/handle-post-upload.sh
parent5caf63d3897f353717fd69be9174d028fd078b23 (diff)
downloadblog.sh-7d773221e7711c4e534e89264c719b4cc5aabb1f.tar.bz2
blog.sh-7d773221e7711c4e534e89264c719b4cc5aabb1f.zip
support for comments on pages
Diffstat (limited to 'utils/handle-post-upload.sh')
-rwxr-xr-xutils/handle-post-upload.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/utils/handle-post-upload.sh b/utils/handle-post-upload.sh
index 1aff46c..43f6b19 100755
--- a/utils/handle-post-upload.sh
+++ b/utils/handle-post-upload.sh
@@ -18,8 +18,8 @@ if [ -d "$CGIBASHOPTS_DIR" ]; then
mkdir -p "$FILE_POST_DESTINATION"
for file in "$CGIBASHOPTS_DIR/"*; do
- cp "$file" "$FILE_POST_DESTINATION"
- POST_FILES="${POST_FILES}$FILE_POST_PATH/$(basename "$file");"
+ cp "$file" "$FILE_POST_DESTINATION/$FORM_attachment"
+ POST_FILES="${POST_FILES}$FILE_POST_PATH/$FORM_attachment;"
done
fi
@@ -28,7 +28,15 @@ $FORM_is_private
$FORM_name
$FORM_email
$POST_FILES
-$FORM_message
+$(sanitize-html-entities "$FORM_message")
NEW_POST
-BODY="OK"
+BODY="$(cat <<RESPONSE
+<main>
+ <article>
+ <h1>Post enviado!</h1>
+ <a href="$FORM_redirect_to">Voltar para a página anterior.</a>
+ </article>
+</main>
+RESPONSE
+)"