aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-03-14 17:38:48 +0100
committerfiaxh <git@lightrise.org>2019-03-14 17:39:31 +0100
commit952ac9548402744ac9b13917255b9e461a96abe5 (patch)
tree0aa4c1c87b0da5961450cf024b1684e264d13c09 /plugins/http-files
parentfb504308d03e078422422b57323f89ae86dac466 (diff)
downloaddino-952ac9548402744ac9b13917255b9e461a96abe5.tar.gz
dino-952ac9548402744ac9b13917255b9e461a96abe5.zip
Use regex literals, fixes some compiler warnings
Diffstat (limited to 'plugins/http-files')
-rw-r--r--plugins/http-files/src/file_provider.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/http-files/src/file_provider.vala b/plugins/http-files/src/file_provider.vala
index 80f99fa6..34106d42 100644
--- a/plugins/http-files/src/file_provider.vala
+++ b/plugins/http-files/src/file_provider.vala
@@ -16,7 +16,7 @@ public class FileProvider : Dino.FileProvider, Object {
public FileProvider(StreamInteractor stream_interactor, Dino.Database dino_db) {
this.stream_interactor = stream_interactor;
this.dino_db = dino_db;
- this.url_regex = new Regex("""^(?i)\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))$""");
+ this.url_regex = /^(?i)\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))$/;
stream_interactor.get_module(MessageProcessor.IDENTITY).received_pipeline.connect(new ReceivedMessageListener(this));
}