link attributes added to l() incorrectly
JohnAlbin - February 28, 2008 - 08:27
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | other |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
There are 9 calls to l() across 6 files that add parameters incorrectly. If you pass an html attribute in the $options array without putting it in attributes =>array() the html attribute will be ignored by l().
For example, theme.inc calls:
l($name, 'user/'. $object->uid, array('title' => t('View user profile.')))But that should be:
l($name, 'user/'. $object->uid, array('attributes' => array('title' => t('View user profile.'))))The other calls are similarly incorrect.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| link-parameters.patch | 6.35 KB | Ignored | None | None |

#1
To get more eyeballs, updated patch for D7.
#2
patching file includes/theme.incHunk #1 FAILED at 1552.
1 out of 2 hunks FAILED -- saving rejects to file includes/theme.inc.rej
patching file modules/blog/blog.module
patching file modules/comment/comment.admin.inc
Hunk #1 FAILED at 64.
1 out of 1 hunk FAILED -- saving rejects to file modules/comment/comment.admin.inc.rej
patching file modules/node/node.module
Hunk #1 FAILED at 135.
1 out of 1 hunk FAILED -- saving rejects to file modules/node/node.module.rej
#3
Thanks for the review, Michael!
I should have checked the patch before asking for reviews on IRC. The code style change for concatenation broke the patch. Doh!
Re-rolled.
#4
Tested, and reviewed the code, straightforward.
#5
Good catch. Committed to CVS HEAD. Seems like it is easy to make mistakes ... wonder if we can do something about that.
Changing version to Drupal 6 for Gabor to review.
#6
#229817: Wrong use of l function in theme_username broke the DRUPAL-6 version of this patch. Just had to remove one section from the patch to get it working.
#7
Good catch. Committed to CVS HEAD. Seems like it is easy to make mistakes ... wonder if we can do something about that.
Changing version to Drupal 6 for Gabor to review.
#8
#258120: Homepage links by unverified users do not properly have rel="nofollow" set was a dupe of this, but got committed.
Re-rolling again.
Please commit before we get one-off patches for each of the other 7 broken l() calls. ;-)
#9
Thanks, committed to Drupal 6!
#10
Automatically closed -- issue fixed for two weeks with no activity.