Results 1 issues of Karol

Moved the `replaceAll('\$', '\\\$')` statement out of the `if (!s.contains('\n'))` so that $s in strings with a `\n` are also escaped. Theoretically also raw strings could be used for these...