aboutsummaryrefslogtreecommitdiffstats
path: root/services/webtheme/webtheme.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/webtheme/webtheme.go')
-rw-r--r--services/webtheme/webtheme.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/webtheme/webtheme.go b/services/webtheme/webtheme.go
index 58aea3bc74..4e89d6dbac 100644
--- a/services/webtheme/webtheme.go
+++ b/services/webtheme/webtheme.go
@@ -70,11 +70,11 @@ func parseThemeMetaInfoToMap(cssContent string) map[string]string {
m := map[string]string{}
for _, item := range matchedItems {
v := item[3]
- if strings.HasPrefix(v, `"`) {
- v = strings.TrimSuffix(strings.TrimPrefix(v, `"`), `"`)
+ if after, ok := strings.CutPrefix(v, `"`); ok {
+ v = strings.TrimSuffix(after, `"`)
v = strings.ReplaceAll(v, `\"`, `"`)
- } else if strings.HasPrefix(v, `'`) {
- v = strings.TrimSuffix(strings.TrimPrefix(v, `'`), `'`)
+ } else if after, ok := strings.CutPrefix(v, `'`); ok {
+ v = strings.TrimSuffix(after, `'`)
v = strings.ReplaceAll(v, `\'`, `'`)
}
m[item[2]] = v
ption> Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/ReferenceController.php
blob: 6ed15e2d2f1c87f648d5ecca0b5e20886d720726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69