   stripTags:(value)->
     value.replace /<(?:.|\n)*?>/gm, ''
 
-  applyTextExpansions: (text)->
+  applyTextExpansions: (text, shorten)->
     return null unless text
     # @expandWwwDotDomains @expandUrls @expandUsernames @expandTags text
+    text = text.replace '&#10;', ' '
+    text = __utils.putShowMore text if shorten
     @expandWwwDotDomains @expandUrls @expandUsernames text
 
   expandWwwDotDomains: (text) ->

    return null unless text
    text.replace /[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/g, (url) ->
      "<a href='#{url}' target='_blank'>#{url}</a>"

  shortenText:do ->
    tryToShorten = (longText, optimalBreak, suffix)->


      # prefer to end the teaser at the end of a sentence (a period).
      # failing that prefer to end the teaser at the end of a word (a space).
      candidate = tryToShorten(longText, '. ', suffix) or tryToShorten longText, ' ', suffix

      if candidate?.length > minLength
        Encoder.htmlEncode candidate
      else
        Encoder.htmlEncode longText

  getMonthOptions : ()->
    ((if i > 9 then { title : "#{i}", value : i} else { title : "0#{i}", value : i}) for i in [1..12])
