         @bookmarks.filter (bookmark) =>
           suggestionTitle = if usePathAndTitle then bookmark.pathAndTitle else bookmark.title
           bookmark.hasJavascriptPrefix ?= Utils.hasJavascriptPrefix bookmark.url
-          bookmark.displayUrl ?= "javascript:..." if bookmark.hasJavascriptPrefix
-          suggestionUrl = bookmark.displayUrl ? bookmark.url
+          bookmark.shortUrl ?= "javascript:..." if bookmark.hasJavascriptPrefix
+          suggestionUrl = bookmark.shortUrl ? bookmark.url
           RankingUtils.matches(@currentSearch.queryTerms, suggestionUrl, suggestionTitle)
       else
         []

    bookmark.children.forEach((child) => @traverseBookmarksRecursive child, results, bookmark) if bookmark.children

  computeRelevancy: (suggestion) ->
    RankingUtils.wordRelevancy(suggestion.queryTerms, suggestion.displayUrl ? suggestion.url, suggestion.title)

class HistoryCompleter
  filter: ({ queryTerms, seenTabToOpenCompletionList }, onComplete) ->


  # Simplify a suggestion's URL (by removing those parts which aren't useful for display or comparison).
  shortenUrl: () ->
    return @shortUrl if @shortUrl?
    # We get easier-to-read shortened URLs if we URI-decode them.
    url = (Utils.decodeURIByParts(@url) || @url).toLowerCase()
