Here is a code fragment :
and the compilation error I get :
!macro foo msg
MessageBox MB_OK ${msg}
!macroend
Function foobar
MessageBox MB_OK "$\""
!insertmacro foo "$\""
FunctionEnd
Either there is something I don't understand about how macro parameters are handled or there is a bug in NSIS.
Function: "foobar"
MessageBox: 0: """
!insertmacro: foo
Error: unterminated string parsing line at macro:foo:1
Error in macro foo on macroline 1
It seems that escaping rules in strings are different for macro parameters than for function calls.