replace XML entities with dollar-curlies