basic/escape: always escape newlines in shell_escape()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Mar 2021 12:47:55 +0000 (13:47 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 May 2021 10:12:42 +0000 (12:12 +0200)
commit566d06ae508ae2f23c555506434028239b2b5b21
tree13c6121a7d870de08e76e1cdd5cf028e0217490b
parent1129cd8a71680f72b9c65b1bf83b96f9581454a3
basic/escape: always escape newlines in shell_escape()

shell_escape() is mostly used for mount paths and similar, where we assume
no newlines are present in the string. But if any were ever present, we
should escape them. So let's simplify the code by making this unconditional.
src/basic/escape.c
src/test/test-escape.c