Opened 16 years ago
Closed 14 years ago
#12183 closed Bug (fixed)
urlize doesn't always add rel=nofollow
| Reported by: | eronen | Owned by: | nobody |
|---|---|---|---|
| Component: | Template system | Version: | 1.1 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
If the text passed to "urlize" template filter or django.utils.html.urlize contains multiple URLs,
and one of them is a mailto: URL, then the URLs after the mailto URL will not have rel=nofollow even
when you called urlize with nofollow=True.
Fix: Move the line "nofollow_attr = nofollow and ' rel="nofollow"' or " inside the
for loop (one line downwards)
Change History (6)
comment:1 by , 16 years ago
| Needs tests: | set |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
| Needs tests: | unset |
|---|
comment:4 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → Bug |
comment:5 by , 14 years ago
| Easy pickings: | unset |
|---|---|
| Has patch: | unset |
| UI/UX: | unset |
the patch for #11911 has been properly factored, a patch for this issue needs to be specifically attached
Note:
See TracTickets
for help on using tickets.
I have attached joint test and fix patches for this bug to ticket #119911. I won't upload them again here.