aboutsummaryrefslogtreecommitdiffstats
path: root/default-config.json
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-03-04 00:34:18 +0300
committerRblSb <msrblsb@gmail.com>2020-03-04 00:34:18 +0300
commitdc83e4842f7bb6f8899872c9693ea6170f0b1724 (patch)
tree119c02e36ca52d0ce88ee441bbf77eec47ca3f35 /default-config.json
parentf369250f8a20f926855e9d0d3d054632e322b987 (diff)
Url chat filter
Diffstat (limited to 'default-config.json')
-rw-r--r--default-config.json12
1 files changed, 10 insertions, 2 deletions
diff --git a/default-config.json b/default-config.json
index e983066..40c3b11 100644
--- a/default-config.json
+++ b/default-config.json
@@ -46,8 +46,16 @@
],
"filters": [
{
- "name": "image", "regex": "(http|https)(:\\/\\/.*\\.)(png|jpg|gif|jpeg)([^ ,]*)", "flags": "g",
- "replace": "<a href='$1$2$3' target='_blank'><img src='$1$2$3$4' style='max-width:200px; max-height:200px' /></a>"
+ "name": "url",
+ "regex": "(https?:\\/\\/[^ \t]*)",
+ "flags": "g",
+ "replace": "<a href='$1' target='_blank' rel='noopener noreferrer'>$1</a>"
+ },
+ {
+ "name": "image",
+ "regex": "(https?:\\/\\/.*\\.)(png|jpg|gif|jpeg)([^ ,]*)",
+ "flags": "g",
+ "replace": "<a href='$1$2$3' target='_blank' rel='noopener noreferrer'><img src='$1$2$3' style='max-width:200px; max-height:200px'/></a>"
}
]
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage