       suffix    = options.suffix     ? '...'
 
       longTextLength  = Encoder.htmlDecode(longText).length
-      # longTextLength  = longText.length
 
       return longText if longTextLength < minLength or longTextLength < maxLength
 

    parentPath.pop()
    return parentPath.join('/')

  defer:do ->
    # this was ported from browserify's implementation of "process.nextTick"
    queue = []

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

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

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