summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Linkify.cpp')
-rw-r--r--SwifTools/Linkify.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/SwifTools/Linkify.cpp b/SwifTools/Linkify.cpp
index 91c713f..2ca284d 100644
--- a/SwifTools/Linkify.cpp
+++ b/SwifTools/Linkify.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/Linkify.h"
+#include <SwifTools/Linkify.h>
#include <boost/regex.hpp>
#include <sstream>
@@ -12,7 +12,7 @@
namespace Swift {
-static boost::regex linkifyRegexp("^https?://.*");
+static boost::regex linkifyRegexp("^(https?://|xmpp:).*");
std::string Linkify::linkify(const std::string& input) {
std::ostringstream result;
@@ -42,7 +42,7 @@ std::string Linkify::linkify(const std::string& input) {
}
}
}
- if (currentURL.size() > 0) {
+ if (!currentURL.empty()) {
std::string url(&currentURL[0], currentURL.size());
result << "<a href=\"" << url << "\">" << url << "</a>";
}