Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
html title are not encoded, fix to title fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Benazera committed Mar 21, 2012
1 parent bcd277c commit ee54272
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/plugins/uri_capture/uri_capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,21 +214,11 @@ namespace seeks_plugins
}
else
{
title = encode::html_decode(miscutil::chomp_cpp(title));
title = miscutil::chomp_cpp(title); // titles are not encoded.
miscutil::replace_in_string(title,"\n","");
miscutil::replace_in_string(title,"\r","");
std::string titlec = charset_conv::charset_check_and_conversion(title,cheaders);
if (titlec.empty())
{
errlog::log_error(LOG_LEVEL_ERROR,"bad charset encoding for title %s or uri %s",
title.c_str(),uris.at(i).c_str());
titles.push_back("");
}
else
{
errlog::log_error(LOG_LEVEL_DEBUG,"fetched title of uri %s\n%s",uris.at(i).c_str(),titlec.c_str());
titles.push_back(titlec);
}
errlog::log_error(LOG_LEVEL_DEBUG,"fetched title of uri %s\n%s",uris.at(i).c_str(),title.c_str());
titles.push_back(title);
}
}
if (err == uris.size())
Expand Down

0 comments on commit ee54272

Please sign in to comment.