fixed: Handle (non) URL encoding and forward backward slashes properly for path substitution