Opened 10 years ago

Closed 10 years ago

#3155 closed defect (fixed)

[patch] urlencode filter fails when passed an integer

Reported by: SmileyChris Owned by: adrian
Component: Template system Version:
Severity: normal Keywords: urlencode
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


My code which is failing:

<a href="...?id={{ user_id|urlescape }}">

user_id is sometimes an integer (when pulled from database), which caused urlescape to fail.

I could just str() it in the view, but it shouldn't really matter. The simple patch converts to a string if it isn't one already.

Attachments (1)

urlencode.patch (448 bytes) - added by SmileyChris 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by SmileyChris

comment:1 Changed 10 years ago by Simon G. <dev@…>

  • Keywords urlencode added
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 10 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(In [4496]) Fixed #3155 -- Allow an integer to be passed to the urlencode filter. Patch
based on one from SmileyChris.

Note: See TracTickets for help on using tickets.
Back to Top