[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.