minor `%` func improvement: preserve quote char and escaped flag, updated tests.