Просмотр исходного кода

Fix escaping on highlight regexps in actions

Change-Id: I7eb68d66e22a0b5834b7dcfd2a403d7787c7533d
Reviewed-on: http://gerrit.dmdirc.com/1053
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4rc1
Chris Smith 14 лет назад
Родитель
Сommit
4dd923f172

+ 6
- 2
src/com/dmdirc/actions/defaults/chancolours/action Просмотреть файл

@@ -32,7 +32,7 @@ concurrency:
32 32
 metadata:
33 33
   description=Changes the colour of channel window names in the treeview (or other frame manager) when events occur.
34 34
   author=Chris <chris@dmdirc.com>
35
-  version=9
35
+  version=10
36 36
   component=7
37 37
 
38 38
 setting 0:
@@ -68,4 +68,8 @@ setting 4:
68 68
   setting=highlightregex
69 69
   title=Highlight regex
70 70
   tooltip=Regular expression to use for matching highlights
71
-  default=(?i).*\\Q${SERVER_MYNICKNAME}\\E.*
71
+  default=(?i).*\\\\Q${SERVER_MYNICKNAME}\\\\E.*
72
+
73
+# Note: \Q..\E is the regex markup to quote the contents
74
+# The actions substitutor escapes with \, so we need \\Q..\\E
75
+# Config files also allow escapes with \, so we end up with \\\\Q..\\\\E

+ 2
- 2
src/com/dmdirc/actions/defaults/querycolours/action Просмотреть файл

@@ -30,7 +30,7 @@ condition 0:
30 30
 metadata:
31 31
   description=Changes the colour of query window names in the treeview (or other frame manager) when events occur.
32 32
   author=Shane <shane@dmdirc.com>
33
-  version=4
33
+  version=5
34 34
   component=11
35 35
 
36 36
 setting 0:
@@ -52,4 +52,4 @@ setting 2:
52 52
   setting=highlightregex
53 53
   title=Highlight regex
54 54
   tooltip=Regular expression to use for matching highlights
55
-  default=(?i).*\\Q${SERVER_MYNICKNAME}\\E.*
55
+  default=(?i).*\\\\Q${SERVER_MYNICKNAME}\\\\E.*

Загрузка…
Отмена
Сохранить