Convert the simple replace into a separate function and apply only to URL locations.
Convert the simple replace into a separate function and apply only to URL locations.

Signed-off-by: Heikki Pora <66addc3de70dbf16feaabbd079cf4cb4cc6762cd@reaktor.fi>

heikkipora/registry-sync,heikkipora/registry-sync,heikkipora/registry-sync