Fixed #22267 -- Fixed unquote/quote in smart_urlquote

A brief comment summarizing the ticket and its relevance here would be helpful.