[cwxml parser] refactor url handling code to use urlparse and urlencode (related to #5456849) [applied]