 
   applyTextExpansions: (text, shorten)->
     return null unless text
-    # @expandWwwDotDomains @expandUrls @expandUsernames @expandTags text
+
     text = text.replace /&#10;/g, ' '
+    text = @expandUsernames text
+
+    # Expand URLs with intention to replace them after putShowMore
+    {links,text} = @expandUrls text, yes
+
     text = __utils.putShowMore text if shorten
-    text = @expandUrls @expandUsernames text
+
+    # Reinsert URLs into text
+    if links? then for link,i in links
+      text = text.replace "[tempLink#{i}]", link
+
+    return text
     # @expandWwwDotDomains @expandUrls @expandUsernames text
 
   expandWwwDotDomains: (text) ->

        # url has no protocol
        url = '//'+url

      "<a href='#{url}' data-original-url='#{originalUrl}' target='_blank' >#{visibleUrl}#{if checkForPostSlash then "/…" else ""}<span class='expanded-link'></span></a>"

  putShowMore: (text, l = 500)->
    shortenedText = __utils.shortenText text,

    (?!\S)
    ///g


    # This will change the original string to either a fully replaced version
    # or a version with temporary replacement strings that will later be replaced
    # with the expanded html tags
    text = text.replace urlGrabber, (url) ->

      url = url.trim()
      originalUrl = url

      # remove protocol and trailing path
      visibleUrl = url.replace(/(ht|f)tp(s)?\:\/\//,"").replace(/\/.*/,"")
      checkForPostSlash = /.*(\/\/)+.*\/.+/.test originalUrl # test for // ... / ...

      if not /[A-Za-z]+:\/\//.test url
