Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hi,
making a link with the l() function. and a anchor.
$mylink = l('My Link Name', 'some/existing/path', array('fragment' => <b>"0"</b>));
returns:
<a href="some/existing/path0">My Link Name</a>
and not:
<a href="some/existing/path#0">My Link Name</a>
Comment | File | Size | Author |
---|---|---|---|
#8 | 605552-fragment-0.patch | 1.8 KB | mr.baileys |
#6 | 605552-fragment_check.patch | 1.48 KB | dawehner |
Comments
Comment #1
johanneshahn CreditAttribution: johanneshahn commentedsorry
wanna make "0" bold.
mean
Comment #2
johanneshahn CreditAttribution: johanneshahn commentedHi,
solve this problem with change common.inc near line 1428 from
to:
Comment #3
johanneshahn CreditAttribution: johanneshahn commentedComment #4
johanneshahn CreditAttribution: johanneshahn commentedComment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedErm. This makes sense. Bumping to Drupal 7: bugs get fixed in the highest affected version, then backported.
Comment #6
dawehnerI think checking against a "" string makes more sense
Comment #8
mr.baileysThe tests were failing since
NULL !== ''
, so not setting $options['fragment'] resulted in '#' being incorrectly appended to URLs. Slightly updated patch to account for $options['fragment'] not being set.Comment #9
Dries CreditAttribution: Dries commentedThis looks RTBC.
Comment #10
Dries CreditAttribution: Dries commentedStill looks RTBC so committed to CVS HEAD. Thanks.