Ticket #6238 enhancement closed wontfix

Opened 5 months ago

Last modified 5 months ago

t.w._flatten._flattenElement should support t.p.urlpath.URLPath

Reported by: tom.prince Owned by:
Priority: normal Milestone:
Component: web Keywords: web templates
Cc: jknight, borko84@… Branch:
Author: borko Launchpad Bug:

Description

I think the right thing to do here is to turn it into a string.

Attachments

6238_v1.diff Download (2.7 KB) - added by borko 5 months ago.

Change History

1

Changed 5 months ago by DefaultCC Plugin

  • cc jknight added

2

Changed 5 months ago by borko

  • cc borko84@… added
  • branch_author set to borko

Changed 5 months ago by borko

3

Changed 5 months ago by borko

  • keywords review added

4

Changed 5 months ago by exarkun

  • keywords review removed

Hi borko. Thanks for working on this.

Sticking to the high-level, it's fairly important that the URL be properly escaped in the output of flatten. This patch so far makes no attempt to apply the proper escaping. Proper escaping here is made more difficult, I think, by the fact that URLPath doesn't bother to document what the result of using str() on it will be, nor whether it its various attributes store encoded or decoded data.

I think perhaps it's a bad idea to try to write any code that uses URLPath, due to the shortcomings of URLPath. A better course would be to work on improving URLPath (or replacing it) to the point where it's possible to be confident in uses of it (in other words, I don't think it is possible to have a satisfactory resolution to this ticket at this time).

At the very minimum, the tests for this feature need to include coverage for the various special characters a URL can include, and the two different flattener cases - inAttribute = True and inAttribute = False.

5

Changed 5 months ago by borko

  • status changed from new to closed
  • resolution set to fixed

Ok. So I opt for creating new ticket for changing URLPath in a way it should be done with precise comment, setting this ticket as blocked and writing short note about this fact including a link to the ticket that must be done before. Thx.

6

Changed 5 months ago by glyph

  • status changed from closed to reopened
  • resolution fixed deleted

7

Changed 5 months ago by glyph

  • status changed from reopened to closed
  • resolution set to wontfix

8

Changed 5 months ago by borko

so what's the final status of this ticket? are we closing it without any changes to URLPath ?

9

Changed 5 months ago by glyph

Just to be clear about my changes, I was simply (dumbly) reacting to the fact that this was closed as "fixed". If it hasn't actually been fixed but it's just waiting to be reopened, 'wontfix' is a more appropriate status. I haven't had time to review it to see if further action is warranted :).

Note: See TracTickets for help on using tickets.