From ca00d9f8ef003602ab410d666b8220ab73e6e0a5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Aug 2008 22:49:11 +0200 Subject: [PATCH] more html special chars replacements --- src/lyrics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lyrics.cpp b/src/lyrics.cpp index 2f9dfaea..ce76f8cb 100644 --- a/src/lyrics.cpp +++ b/src/lyrics.cpp @@ -55,7 +55,7 @@ string GetLyrics(string artist, string song) for (string::iterator it = artist.begin(); it != artist.end(); it++) if (*it == ' ') *it = '+'; - + for (string::iterator it = song.begin(); it != song.end(); it++) if (*it == ' ') *it = '+'; @@ -91,6 +91,10 @@ string GetLyrics(string artist, string song) result.replace(i, 6, "'"); for (int i = result.find("""); i != string::npos; i = result.find(""")) result.replace(i, 6, "\""); + for (int i = result.find("<"); i != string::npos; i = result.find("<")) + result.replace(i, 4, "<"); + for (int i = result.find(">"); i != string::npos; i = result.find(">")) + result.replace(i, 4, ">"); std::ofstream output(fullpath.c_str());