inlined handleEscapingVariables