Web users commonly recognize URLs without the protocol (http://) or trailing slash (/), and, similarly, they will enter URLs in this fashion in address fields. In this recipe, we will create a humanize_url filter that is used to present URLs to the user in a shorter format, truncating very long addresses, similar to what Twitter does with the links in tweets.