[RFC] Fix newline substitution causing abort

Fixes #1529.

As explained there, this is one of two possible solutions, that should have to be discussed. 
But, in the meantime, it's requested for this to be merged so that master doesn't abort in that case.
:+1: Not sure between those two, though. I think I'd choose the first one. You?