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.
When a notification email is sent which includes a node that has links (e.g. <a href="www.drupal.org">Drupal</a>
) in its body text, the following appears in the mail:
....
Drupal [1]
....
[1] http://www.drupal.org
This is fine except for when more than 1 recipient receives the mail. The first recipient will have the [1] label on the link, while the second recipient will have [2], and so on.
I've attached a patch that fixes this. It also resets the link numbers back to 1 on each new node/comment included in the one email. If you don't want this, then let me know and I'll add an alternative patch.
Comment | File | Size | Author |
---|---|---|---|
notify_url_count.patch | 1009 bytes | stella | |
Comments
Comment #1
beginner CreditAttribution: beginner commentedI have been able to reproduce the bug.
The patch includes a regex change that is best kept out. It is relevant to that issue: http://drupal.org/node/94118 .
Is this why you declare $urls = array() here:
If I understand well, this would actually reset $urls to an empty array. Is your comment above the reason for this?
Also, the patch won't apply:
See http://drupal.org/patch/create
Comment #2
matt2000 CreditAttribution: matt2000 commentedAFAIK, this issue no longer exists since we now use drupal_html_to_text()