Ticket #24 (closed enhancement: worksforme)

Opened 6 months ago

Last modified 2 months ago

There shouldn't be any escape characters in URLs

Reported by: Ben Owned by: sheep
Priority: Normal Milestone:
Component: Hatta Wiki Version: 1.3.3dev
Keywords: urls Cc:

Description

Ok, let's begin another disputable one ...

I'm being puzzled by all the escape characters in the URLs. To my understanding, escaping character is already a fix because those characters shouldn't be in URLs at first.

I'm mainly having trouble with the spaces. I don't want to have to share URL containing % symbols to my colleagues.

How I see the perfect solution:

Introduce openers: translation mechanism between filename and url. As I understood, you already needs something like that for the doc tree support. We can even introduce a third logical namespace: "display" we would have:

  • filename
  • url name
  • display name

Where display name would be the full one, filename would be platform dependant and URL name browser compliant.

The conversion would only be made in one side: URL -> display name -> filename.

I'm not settled yet on the way to implement it. That's why I'm mostly taking this page as a discussion board.

Change History

comment:1 Changed 6 months ago by sheep

%-encoding is not a workaround, it's a perfectly valid and standard-compliant way of forming URLs. Some wiki engines, like MoinMoin, have recently switched to it, from some more guerilla methods like using _ or + for spaces. I probably don't need to add that the switch was painful both for users and developers.

Moreover, most web browsers will automatically %-encode the characters you type in the address bar, so you can type the page name with space and accented characters, and you will get to the right page. Some browsers even hide the encoding and display actual spaces and accented characters in the URL.

Any other approach would require manual escaping or replacing of characters.

Note also that both the title<->filename and title<->url mappings need to be full and unique: that is, there should always be one and exactly one filename correspondig to a title, and one url. And that filename/url must not correspond to any other title. %-encoding does that (with some additional restriction). Any other encoding that would achieve it would be equally unwieldly (but not as standardized and popular).

comment:2 Changed 6 months ago by sheep

  • Status changed from new to accepted
  • Version changed from 1.3.3 to 1.3.3dev
  • Reporter changed from Ben to Ben <benoit@…>

Any suggestions on this?

comment:3 Changed 6 months ago by sheep

  • Reporter changed from Ben <benoit@…> to Ben

comment:4 Changed 2 months ago by sheep

  • Status changed from accepted to closed
  • Resolution set to worksforme
Note: See TracTickets for help on using tickets.