Page MenuHomePhabricator

Citoid should recognise per cent-encoded URLs and avoid double-encoding them
Closed, DuplicatePublic1 Estimated Story Points

Description

Steps to reproduce

  1. Click the Cite button in VisualEditor
  2. Paste in https://zhaofeng.li/sandbox/ .html. The reference will be generated correctly.
  3. Paste in https://zhaofeng.li/sandbox/%20.html. It will fail to generate a citation.

Why?

Because the URL is automatically (re-)encoded in ve.ui.CiteFromIdInspector.js before the request is sent, changing "%20" to "%2520". In order to prevent double-encoding, the script should decode the URL first.

References

Event Timeline

Jdforrester-WMF renamed this task from Double-encoding when processing an already-encoded URL to Citoid should recognise per cent-encoded URLs and avoid double-encoding them.Jul 19 2016, 7:14 PM
Jdforrester-WMF triaged this task as Low priority.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.