don't use numeric escapes that's not proper!
This commit is contained in:
parent
92222d41b8
commit
23499711bc
14
build.sh
14
build.sh
|
@ -44,10 +44,12 @@ __SHLVL=0
|
||||||
|
|
||||||
# lowdown wrapper function
|
# lowdown wrapper function
|
||||||
__lowdown() {
|
__lowdown() {
|
||||||
lowdown --html-no-owasp --html-no-skiphtml --html-no-escapehtml "$@" | sed -E '
|
lowdown --html-no-owasp --html-no-skiphtml --html-no-escapehtml --html-no-num-ent "$@" | \
|
||||||
s/̵[67];/\'/g
|
sed -E '
|
||||||
s/–/--/g
|
s/&[lr]squo;/\'/g
|
||||||
s/̶[01];/\"/g'
|
s/–/--/g
|
||||||
|
s/&[lr]dquo;/\"/g
|
||||||
|
'
|
||||||
}
|
}
|
||||||
|
|
||||||
# process a pure markdown file
|
# process a pure markdown file
|
||||||
|
@ -122,7 +124,7 @@ escape() {
|
||||||
*\<*) __ESC_STR="${__ESC_STR%<*}<${__ESC_STR##*<}" ;;
|
*\<*) __ESC_STR="${__ESC_STR%<*}<${__ESC_STR##*<}" ;;
|
||||||
*\>*) __ESC_STR="${__ESC_STR%>*}>${__ESC_STR##*>}" ;;
|
*\>*) __ESC_STR="${__ESC_STR%>*}>${__ESC_STR##*>}" ;;
|
||||||
*\"*) __ESC_STR="${__ESC_STR%\"*}"${__ESC_STR##*\"}" ;;
|
*\"*) __ESC_STR="${__ESC_STR%\"*}"${__ESC_STR##*\"}" ;;
|
||||||
*\'*) __ESC_STR="${__ESC_STR%\'*}'${__ESC_STR##*\'}" ;;
|
*\'*) __ESC_STR="${__ESC_STR%\'*}'${__ESC_STR##*\'}" ;;
|
||||||
*) break;
|
*) break;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -132,7 +134,7 @@ escape() {
|
||||||
# good for large inputs with lots of chars to escape
|
# good for large inputs with lots of chars to escape
|
||||||
# this means mostly full files, entire posts for putting in content for a feed
|
# this means mostly full files, entire posts for putting in content for a feed
|
||||||
escapepipe() {
|
escapepipe() {
|
||||||
sed -e 's/&/\&/g' -e 's/</\</g' -e 's/>/\>/g' -e 's/"/\"/g' -e "s/'/\\'/g"
|
sed -e 's/&/\&/g' -e 's/</\</g' -e 's/>/\>/g' -e 's/"/\"/g' -e "s/'/\\'/g"
|
||||||
}
|
}
|
||||||
|
|
||||||
# build folder structure
|
# build folder structure
|
||||||
|
|
Loading…
Reference in New Issue