Changeset 991 for trunk/lib


Ignore:
Timestamp:
Dec 16, 2009, 1:08:17 AM (12 years ago)
Author:
Peter Johansson
Message:

closes #430. Declare in HTML header that output is encoded in UTF-8. HtmlBuf? only massages characters that are special mark-up characters. We do not massage non-ascii chars such as umlaut and friends because most modern browsers should be able to display those anyway, and if they don't it is not crucial as it typically only involves comments in the blame output.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/HtmlBuf.cc

    r990 r991  
    3030    : std::streambuf(), buf_(buf)
    3131  {
    32     map_['"']=std::string("\"");
     32    map_['"']=std::string(""");
    3333    map_['\'']=std::string("\'");
    3434    map_['\n']=std::string("<br />");
     
    3939    // This should be configurable, but for now indentation is two spaces.
    4040    map_['\t']=std::string("&nbsp;&nbsp;");
    41     /*
    42     map_['å']=std::string("&aring;");
    43     map_['ä']=std::string("&auml;");
    44     map_['ö']=std::string("&ouml;");
    45     map_['Å']=std::string("&Aring;");
    46     map_['Ä']=std::string("&Auml;");
    47     map_['Ö']=std::string("&Ouml;");
    48     map_['é']=std::string("&eacute;");
    49     map_['É']=std::string("&Eacute;");
    50     map_['á']=std::string("&aacute;");
    51     map_['Á']=std::string("&Aacute;");
    52     */
    5341  }
    5442
  • trunk/lib/html_utility.cc

    r978 r991  
    178178       << "<head>\n"
    179179       << "<title> " << title << " - svndigest</title>\n"
     180       << "<meta http-equiv=\"Content-type\" content=\"text/html; "
     181       << "charset=UTF-8\" />\n"
    180182       << "<link rel=\"stylesheet\" "
    181183       << "href=\"";
Note: See TracChangeset for help on using the changeset viewer.