You could try to use CSS to truncate the string with an ellipsis using methods such as this one by Justin Maxwell.
Basically, to make it work cross-browser, you have to use a combination of standard CSS, browser-specific CSS and some XML. The full writeup can be read at the link above, but the end product is:
.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    -moz-binding: url('assets/xml/ellipsis.xml#ellipsis');
}
combined with 
<?xml version="1.0"?>
<bindings
  xmlns="http://www.mozilla.org/xbl"
  xmlns:xbl="http://www.mozilla.org/xbl"
  xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
    <binding id="ellipsis">
     <content>
      <xul:window>
       <xul:description crop="end" xbl:inherits="value=xbl:text"><children/></xul:description>
      </xul:window>
     </content>
    </binding>
</bindings>
Then decorate your div with the CSS class="ellipsis"