From 7d773221e7711c4e534e89264c719b4cc5aabb1f Mon Sep 17 00:00:00 2001 From: Jefferson Julio Date: Wed, 2 Jun 2021 23:38:09 -0300 Subject: support for comments on pages --- utils/handle-post-upload.sh | 16 ++++++++++++---- utils/parse-article-content.sh | 6 ------ 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'utils') 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 +)" diff --git a/utils/parse-article-content.sh b/utils/parse-article-content.sh index 40593c5..b217632 100755 --- a/utils/parse-article-content.sh +++ b/utils/parse-article-content.sh @@ -2,12 +2,6 @@ # Skip file metadata, first 3 lines -sanitize-html-entities () { - echo "$1" | - sed 's//\>/g' -} - parse-article-content-file () { local PRE_TAG= local IGNORE_NEXT_PRE_TAG= -- cgit v1.2.3