Skip to content

Commit a3bfb62

Browse files
authored
Privacy experience report fixes (#590)
* feat: normalize image paths for main image * feat: privacy experience fixes
1 parent bb1969f commit a3bfb62

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

content/articles/privacy-experience-report.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ _Behavior: Users frequently misunderstood what data or actions were protected ve
6868

6969
> “I thought shielded would mean my vote would always be private… weird that I had to hover to see details.”
7070
71-
![Snapshot UI](public/articles/privacy-experience-report/snapshot-UI1.webp)
71+
![Snapshot UI](/articles/privacy-experience-report/snapshot-UI1.webp)
7272

7373
Snapshot UI
7474

7575
> “There are so many leaks if I’m using Alchemy… what is the point?”
7676
77-
![Privacy Pool Github](public/articles/privacy-experience-report/Privacy-Pool-Github_1.webp)
77+
![Privacy Pool Github](/articles/privacy-experience-report/Privacy-Pool-Github_1.webp)
7878

7979
Privacy Pool Github
8080

@@ -97,13 +97,13 @@ _Behavior: Trust decisions were driven by brand reputation, not by verifiable or
9797
9898
> “If the last release was three months ago and not many stars, I don’t feel confident.”
9999
100-
![Railgun Github](public/articles/privacy-experience-report/Railgun-Github_1.webp)
100+
![Railgun Github](/articles/privacy-experience-report/Railgun-Github_1.webp)
101101

102102
Railgun Github
103103

104104
> “Only you and Fluidkey can see all your transactions… Fluidkey team? Operator? What does that mean?”
105105
106-
![Fluidkey UI](public/articles/privacy-experience-report/Fluidkey-UI_1.webp)
106+
![Fluidkey UI](/articles/privacy-experience-report/Fluidkey-UI_1.webp)
107107

108108
Fluidkey UI
109109

@@ -124,17 +124,17 @@ _Behavior: Participants found setup flows fragmented, verbose, or opaque, especi
124124
125125
> “Why do I need to buy an ENS just to test?”
126126
127-
![Snapshot UI](public/articles/privacy-experience-report/Snapshot UI_2.webp)
127+
![Snapshot UI](/articles/privacy-experience-report/Snapshot UI_2.webp)
128128

129129
Snapshot UI
130130

131-
![Snapshot UI](public/articles/privacy-experience-report/Snapshot UI_3.webp)
131+
![Snapshot UI](/articles/privacy-experience-report/Snapshot UI_3.webp)
132132

133133
Snapshot UI
134134

135135
> “I would never trust online generated seed, that’s the basic of crypto security.”
136136
137-
![Privacy Pool UI](public/articles/privacy-experience-report/Privacy Pool UI.webp)
137+
![Privacy Pool UI](/articles/privacy-experience-report/Privacy Pool UI.webp)
138138

139139
Privacy Pool UI
140140

@@ -156,13 +156,13 @@ _Behavior: Users struggled with hidden controls, unclear defaults, and missing c
156156
157157
> “Where are the privacy controls? It’s just this tiny text.”
158158
159-
![Snapshot/Shutter UI](public/articles/privacy-experience-report/Snapshot_Shutter UI_1.webp)
159+
![Snapshot/Shutter UI](/articles/privacy-experience-report/Snapshot_Shutter UI_1.webp)
160160

161161
Snapshot/Shutter UI
162162

163163
> “If it’s private by default, that’s perfect. I shouldn’t have to think about it.”
164164
165-
![Flashbot UI](public/articles/privacy-experience-report/Flashbot UI_1.webp)
165+
![Flashbot UI](/articles/privacy-experience-report/Flashbot-UI_1.webp)
166166

167167
Flashbot UI
168168

@@ -181,23 +181,23 @@ _Behavior: Users feared doing irreversible or unverified actions (e.g., sending
181181

182182
> “There’s no testing mode. I wouldn’t send 1 ETH through something untested.”
183183
184-
![Flashbot UI](public/articles/privacy-experience-report/Flashbot UI_2.webp)
184+
![Flashbot UI](/articles/privacy-experience-report/Flashbot-UI_2.webp)
185185

186186
Flashbot UI
187187

188188
> “I want to see the contract before confirming the transaction.”
189189
190-
![Etherscan of Privacy Pool tx](public/articles/privacy-experience-report/Etherscan of Privacy Pool tx.webp)
190+
![Etherscan of Privacy Pool tx](/articles/privacy-experience-report/Etherscan of Privacy Pool tx.webp)
191191

192192
Etherscan of Privacy Pool tx
193193

194-
![Privacy Pool contract on Etherscan](public/articles/privacy-experience-report/Privacy Pool contract on Etherscan.webp)
194+
![Privacy Pool contract on Etherscan](/articles/privacy-experience-report/Privacy Pool contract on Etherscan.webp)
195195

196196
Privacy Pool contract on Etherscan
197197

198198
> “I wouldn’t download something random, even on this machine.”
199199
200-
![Railgun UI](public/articles/privacy-experience-report/Railgun UI_1.webp)
200+
![Railgun UI](/articles/privacy-experience-report/Railgun UI_1.webp)
201201

202202
Railgun UI
203203

@@ -218,7 +218,7 @@ _Behavior: Motivation to use privacy tools varied by context._
218218
219219
> “For large fund transfers I’d plan ahead, so waiting isn’t a big issue.”
220220
221-
![Privacy Pool UI](public/articles/privacy-experience-report/Privacy Pool UI_2.webp)
221+
![Privacy Pool UI](/articles/privacy-experience-report/Privacy Pool UI_2.webp)
222222

223223
Privacy Pool UI
224224

@@ -237,13 +237,13 @@ _Behavior: Even advanced users struggled to articulate how features like stealth
237237

238238
> “A normal user probably doesn’t know what stealth addresses are, even I’m not sure I could define it.”
239239
240-
![Fluidkey UI](public/articles/privacy-experience-report/Fluidkey UI_3.webp)
240+
![Fluidkey UI](/articles/privacy-experience-report/Fluidkey-UI_3.webp)
241241

242242
Fluidkey UI
243243

244244
> “‘Power user’ makes me feel like maybe I’m not technical enough.”
245245
246-
![Fluidkey UI](public/articles/privacy-experience-report/Fluidkey UI_4.webp)
246+
![Fluidkey UI](/articles/privacy-experience-report/Fluidkey UI_4.webp)
247247

248248
Fluidkey UI
249249

@@ -264,7 +264,7 @@ _Behavior: Across all interviews, users consistently valued:_
264264

265265
> “Anything that makes me feel a little bit more safe is important, like links to audits, social proof.”
266266
267-
![Fluidkey UI](public/articles/privacy-experience-report/Fluidkey UI_5.webp)
267+
![Fluidkey UI](/articles/privacy-experience-report/Fluidkey UI_5.webp)
268268

269269
Fluidkey UI
270270

lib/content.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ function normalizeImagePath(
3939
}
4040
}
4141

42+
// URL-encode spaces in the path for browser compatibility
43+
normalized = normalized
44+
.split("/")
45+
.map((segment) => encodeURIComponent(segment))
46+
.join("/")
47+
4248
return `/${normalized}`
4349
}
4450

@@ -47,8 +53,12 @@ function normalizeContentImagePaths(
4753
defaultBasePath: string = "articles",
4854
slug?: string
4955
): string {
50-
const markdownImageRegex = /!\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g
51-
content = content.replace(markdownImageRegex, (match, alt, imagePath) => {
56+
// Updated regex to capture everything inside parentheses, including spaces in filenames
57+
const markdownImageRegex = /!\[([^\]]*)\]\(([^)]+)\)/g
58+
content = content.replace(markdownImageRegex, (match, alt, fullPath) => {
59+
// Handle optional title (e.g., ![alt](path "title"))
60+
const pathMatch = fullPath.match(/^(.+?)\s+"[^"]*"$/)
61+
const imagePath = pathMatch ? pathMatch[1].trim() : fullPath.trim()
5262
const normalized = normalizeImagePath(imagePath, defaultBasePath, slug)
5363
return `![${alt}](${normalized})`
5464
})

0 commit comments

Comments
 (0)