The function "short_url" is used in several addons, so it deserves a central place.