#19532 closed Bug (invalid)
URL encoding error in set_script_prefix
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Core (URLs) | Version: | 1.5-beta-1 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
We found this as a regression bug when we switched to using django 1.5.
We were generating a fully qualified url to be used as a link within an email, by doing
set_script_prefix('http://%s' % self.domain)
The url with this prefix was generated fine with django 1.4.3, but with 1.5, the url was turned into 'http%3A...'
Change History (4)
comment:1 by , 12 years ago
Description: | modified (diff) |
---|---|
Severity: | Normal → Release blocker |
Type: | Uncategorized → Bug |
comment:2 by , 12 years ago
I suppose that this behaviour was introduced in the commit [90e530978d590a5bd] that fixes #18210.
comment:3 by , 12 years ago
I can confirm that it was [90e530978d590a5bdcf75525aa03f844766018b8]. (Why do you have to be faster than me :/)
comment:4 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
set_script_prefix
isn't documented; it's a private API, not subject to the backwards-compatibility policy.
Its behavior was changed on purpose, to fix a #18210. This isn't a regression.
The URL resolver doesn't deal with the domain part; you have to include it separately in the template.
(Bug reported by Frank Wiles.)
Clearly, this isn't the intended use of
set_script_prefix
.However, we should find out which commit introduced this change and ensure that it was done for a good reason (rather than by accident).