diff options
author | Jefferson Julio <[email protected]> | 2021-06-02 23:38:09 -0300 |
---|---|---|
committer | Jefferson Julio <[email protected]> | 2021-06-02 23:38:09 -0300 |
commit | 7d773221e7711c4e534e89264c719b4cc5aabb1f (patch) | |
tree | baf59501215d3ee874b865c70c9b9d1408545a16 /utils/handle-post-upload.sh | |
parent | 5caf63d3897f353717fd69be9174d028fd078b23 (diff) | |
download | blog.sh-7d773221e7711c4e534e89264c719b4cc5aabb1f.tar.bz2 blog.sh-7d773221e7711c4e534e89264c719b4cc5aabb1f.zip |
support for comments on pages
Diffstat (limited to 'utils/handle-post-upload.sh')
-rwxr-xr-x | utils/handle-post-upload.sh | 16 |
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 +)" |