fix bash
This commit is contained in:
@@ -66,8 +66,12 @@ for file in $(ls "$BLOG_DIR/posts"); do
|
||||
slug=$(sed -n '2p' $target_file | tr -d '\n')
|
||||
title=$(sed -n '3p' $target_file | tr -d '\n')
|
||||
content=$(sed -n '4,$p' $target_file | tr -d '\n')
|
||||
# Cool little sed to escape html
|
||||
content=$(sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g' "$content")
|
||||
|
||||
content=${1//&/&}
|
||||
content=${s//</<}
|
||||
content=${s//>/>}
|
||||
content=${s//'"'/"}
|
||||
content=${s//"'"/‘}
|
||||
|
||||
insert_post "$date" "$slug" "$title" "$content"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user