A partial archive of https://discourse-mediawiki.wmflabs.org as of Saturday May 21, 2022.

Encoding URL for QuickStatements

Papuass

I am writing some import scripts for Wikdata QuickStatements import tool.

There is an option to run it fro URL, however I am struggling with encoding. For references I want to use URLs like this one, which includes some problematic characters — _&=/?).

If I try to replace these with URL encoding values, some of them are not encoded back.

Is the problem on QuickStatements side or am I missing something?

LucasWerkmeisterWMDE

Are you using QuickStatements v1 or QuickStatements v2?

Papuass

I am using V2 (in V1 format)

LucasWerkmeisterWMDE

This seems to work:

https://tools.wmflabs.org/quickstatements/#v1=Q4115189|P856|"http://titania.saeima.lv/personal/deputati/saeima10_depweb_public.nsf/0/B9B76711C69460FCC22577BC0021BA20?OpenDocument&lang=EN"

I didn’t URL encode anything here (except the quotation marks around the URL, "%22), and it seems to have worked (diff).