diff options
| author | Paul Buetow <paul@buetow.org> | 2023-05-08 00:47:13 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-05-08 00:47:13 +0300 |
| commit | b9a748dafccc7f28aa695d3590be952560eedb35 (patch) | |
| tree | 508bff7e78561b1a3c8d4a3291564a1713f72da5 /lib | |
| parent | e3f7a795d0f5741b145f843dc2a31e97f8d6a67d (diff) | |
also escape ' properly
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/atomfeed.source.sh | 2 | ||||
| -rw-r--r-- | lib/html.source.sh | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/atomfeed.source.sh b/lib/atomfeed.source.sh index cc810d1..079c2fb 100644 --- a/lib/atomfeed.source.sh +++ b/lib/atomfeed.source.sh @@ -74,7 +74,7 @@ ATOMHEADER while read -r gmi_file; do atomfeed::_entry "$gemfeed_dir" "$gmi_file" "$atom_file.tmp" - done < <(gemfeed::get_posts | head -n $ATOM_MAX_ENTRIES) + done < <(gemfeed::get_posts | head -n "$ATOM_MAX_ENTRIES") cat <<ATOMFOOTER >> "$atom_file.tmp" </feed> diff --git a/lib/html.source.sh b/lib/html.source.sh index 7056f24..8f057a0 100644 --- a/lib/html.source.sh +++ b/lib/html.source.sh @@ -4,6 +4,7 @@ html::encode () { s|\&|\&|g; s|<|\<|g; s|>|\>|g; + s|'\''|\'|g; ' <<< "$@" } @@ -70,7 +71,7 @@ html::make_link () { descr="$link" fi - echo "<a class='textlink' href='$link'>$descr</a><br />" + echo "<a class='textlink' href='$($SED 's/'\''/\'/g' <<< "$link")'>$descr</a><br />" } html::process_inline () { |
