Skip to content

Fix text section "'" substitution - #20

Open
sladkani wants to merge 1 commit into
jirutka:masterfrom
sladkani:singlequote-escape-fix
Open

Fix text section "'" substitution#20
sladkani wants to merge 1 commit into
jirutka:masterfrom
sladkani:singlequote-escape-fix

Conversation

@sladkani

Copy link
Copy Markdown

Previusly, every ' in TEXT part was relpaced by '\'', using:
gsub("'", "'\\''", _str)

However, certain awk implementations (e.g. busybox v1.37.0 Debian 1:1.37.0-6+b5) fails to perform the backquoted gsub, resulting with output of ''' .

Instead, let's replace ' with '"'"' (double quote wrapping of the input's single quote).

Previusly, every @'@ in TEXT part was relpaced by @'\''@, using:
  gsub("'", "'\\''", _str)

However, certain awk implementations (e.g. busybox v1.37.0 Debian
1:1.37.0-6+b5) fails to perform the backquoted gsub, resulting with
output of ''' .

Instead, let's replace @'@ with @'"'"'@ (double quote wrapping of
the input's single quote).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant