From 7a4fafa8fc79ad1db11b69304504532d7bc63256 Mon Sep 17 00:00:00 2001 From: Lajamerr Mittesdine Date: Fri, 29 Jun 2018 02:14:04 -0400 Subject: [PATCH] Fix issue on Windows not matching links correctly. In Windows a carriage return(Hex 0D) is separate from new line(Hex 0A). Before it was only replacing the new line with | and leaving it with the carriage return. Linux ignores these by default I think. So that when on Windows it created improperly formatted data for the regex syntax. This fix still replaces new line with | but it also removes anything considered a space with \s --- src/common/LinkParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/LinkParser.cpp b/src/common/LinkParser.cpp index 1c081d8d9..c288741df 100644 --- a/src/common/LinkParser.cpp +++ b/src/common/LinkParser.cpp @@ -17,7 +17,7 @@ LinkParser::LinkParser(const QString &unparsedString) t1.setCodec("UTF-8"); // Read the TLDs in and replace the newlines with pipes - QString tldData = t1.readAll().replace("\n", "|"); + QString tldData = t1.readAll().replace(QRegExp("[\\n]"), "|").remove(QRegExp("[\\s]")); const QString urlRegExp = "^"