Changeset 275


Ignore:
Timestamp:
May 3, 2007, 12:14:28 AM (16 years ago)
Author:
Peter Johansson
Message:

Fixes #174.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/html_utility.cc

    r274 r275  
    435435      std::replace(mess.begin(), mess.end(), '\n', ' ');
    436436      mess = htrim(mess);
    437       // trunctate message if too long
     437      // truncate message if too long
    438438      if (mess.size()>maxlength)
    439439        mess = mess.substr(0,maxlength-3) + "...";
     
    446446        for (ss.get(c); ss.good(); ss.get(c)) {
    447447          if (c=='#') {
    448             std::string str;
    449             ss >> str;
    450             if (is_int(str))
    451               os << anchor(conf->trac_ticket()+str,"#"+str);
    452             else
    453               hs << "#" << str;
     448            int ticket=0;
     449            ss >> ticket;
     450            if (!ss.fail()){
     451              std::stringstream s;
     452              s << ticket;
     453              os << anchor(conf->trac_ticket()+s.str(),"#"+s.str());
     454            }
     455            else {
     456              ss.clear(std::ios::goodbit);
     457              hs << c;
     458            }
    454459          }
    455460          else
Note: See TracChangeset for help on using the changeset viewer.