replace only specific message variables

this avoids errors when using {} in message strings
Merge pull request #875 from xi/feature-fix-message-variables

replace only specific message variables