diff --git a/src/episode.cpp b/src/episode.cpp index f665e08..edd162d 100644 --- a/src/episode.cpp +++ b/src/episode.cpp @@ -90,9 +90,22 @@ namespace dropout_dl { return out; } + std::string remove_escaped_characters(const std::string& str) { + std::string out; + + for (int i = 0; i < str.size(); i++) { + if (str[i] == '\\') { + i++; + } + out += str[i]; + } + + return out; + } + std::string format_name_string(const std::string& str) { - return replace_html_character_codes(remove_leading_and_following_whitespace(str)); + return remove_escaped_characters(replace_html_character_codes(remove_leading_and_following_whitespace(str))); } std::string format_filename(const std::string& str) {