From 122a4ec1037dfd027d9f3f7d5d25ce63dfe4450a Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 26 Jun 2026 02:01:08 +0200 Subject: fix: decode wiki article names for clean storage - wikidata.go: url.PathUnescape SPARQL titles before storing - wikiarticle.go: PathUnescape on read, PathEscape on send - DB holds decoded names; URLs are always freshly encoded --- src/wikidata.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wikidata.go') diff --git a/src/wikidata.go b/src/wikidata.go index 20411d2..c775f1f 100644 --- a/src/wikidata.go +++ b/src/wikidata.go @@ -175,7 +175,7 @@ func (a *App) queryWikidataBatch(ids []string) (map[string]wikiAcc, error) { if n, ok := b["article"]; ok && n.Value != "" { // Extract title from URL: strip "https://en.wikipedia.org/wiki/" - title := strings.TrimPrefix(n.Value, "https://en.wikipedia.org/wiki/") + title, _ := url.PathUnescape(strings.TrimPrefix(n.Value, "https://en.wikipedia.org/wiki/")) results[imdb] = wikiAcc{ wikiArticle: n.Value, title: title, -- cgit v1.2.3