Page MenuHomePhabricator

Parsoid: Percent-encode % in URLs
Closed, ResolvedPublic


A this page:

You have a link with this href attribute:

Like you can see this is not URL encoded, the '%' sign is a reserved character and *must* be encoded IMO.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:05 AM
bzimport set Reference to bz53146. agrees with you. I believe we currently only percent-encode % to %25 when followed by hex chars.

We have fixed a really old, but similar, bug in Kiwix, three week ago in HK... but whereas C++ doesn't have escape/unescape buildin functions, javascript does: (encodeURIComponent()/decodeURIComponent())... So I was a little bit surprise to catch such one!

We only use those selectively, as the JS version also encodes chars that don't need to be encoded when using UTF8:


Change 80318 had a related patch set uploaded by GWicke:
Bug 53146: Percent-encode fragment identifiers too

Change 80318 merged by jenkins-bot:
Bug 53146: Percent-encode fragment identifiers too