Yeah, I'll put that in a function.

There's no global parameter for the URL root of owncloud, especially none you can use to determine the absolute URL for cached images (favicons) while the feeds are imported (via cron). That's why the absolute paths are set on request.