diff --git a/src/conv.cpp b/src/conv.cpp index 0f1e8125..c5b94d37 100644 --- a/src/conv.cpp +++ b/src/conv.cpp @@ -206,7 +206,7 @@ void EscapeUnallowedChars(std::string &s) } } -void EscapeHtml(std::string &s) +void StripHtmlTags(std::string &s) { bool erase = 0; for (size_t i = s.find("<"); i != std::string::npos; i = s.find("<")) diff --git a/src/conv.h b/src/conv.h index ffcef17e..b4608895 100644 --- a/src/conv.h +++ b/src/conv.h @@ -60,7 +60,7 @@ std::string Shorten(const std::basic_string &s, size_t max_length); void EscapeUnallowedChars(std::string &); -void EscapeHtml(std::string &s); +void StripHtmlTags(std::string &s); void Trim(std::string &s); diff --git a/src/info.cpp b/src/info.cpp index 587dd899..fa58cacd 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -245,7 +245,7 @@ void *Info::PrepareArtist(void *screen_void_ptr) if (a != std::string::npos) { - EscapeHtml(result); + StripHtmlTags(result); *screen->w << "Last.fm returned an error message: " << result; ArtistReady = 1; pthread_exit(0); @@ -259,7 +259,7 @@ void *Info::PrepareArtist(void *screen_void_ptr) result[j] = '.'; i += static_strlen(""); similar.push_back(result.substr(i, j-i)); - EscapeHtml(similar.back()); + StripHtmlTags(similar.back()); } std::vector urls; for (size_t i = result.find(""); i != std::string::npos; i = result.find("")) @@ -299,7 +299,7 @@ void *Info::PrepareArtist(void *screen_void_ptr) result = result.substr(a, b-a); } - EscapeHtml(result); + StripHtmlTags(result); Trim(result); std::ostringstream filebuffer; diff --git a/src/lyrics_fetcher.cpp b/src/lyrics_fetcher.cpp index 16c9333b..2bd992d6 100644 --- a/src/lyrics_fetcher.cpp +++ b/src/lyrics_fetcher.cpp @@ -87,7 +87,7 @@ bool LyricsFetcher::getContent(const char *open_tag, const char *close_tag, std: void LyricsFetcher::postProcess(std::string &data) { - EscapeHtml(data); + StripHtmlTags(data); Trim(data); }