Opened 18 years ago
Closed 18 years ago
#3155 closed defect (fixed)
[patch] urlencode filter fails when passed an integer
Reported by: | Chris Beaven | Owned by: | Adrian Holovaty |
---|---|---|---|
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: | no | UI/UX: | no |
Description
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)
Change History (3)
by , 18 years ago
Attachment: | urlencode.patch added |
---|
comment:1 by , 18 years ago
Keywords: | urlencode added |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [4496]) Fixed #3155 -- Allow an integer to be passed to the urlencode filter. Patch
based on one from SmileyChris.