The "Not Spam (1)" that is displayed below a node after you manually mark it as 'not spam' does not display correctly: it shows the a href link instead of linking the "1" to the correct place. See attached image.

It displays the following:

    * not spam (<a href="/admin/spam/logs/node/612">1</a>)
    * mark as spam
    * report as spam

Here is the code behind the spam module's links in the Links Bar:

<li class="spam-probability"><span class="spam-probability">not spam (&lt;a href="/admin/spam/logs/node/612"&gt;1&lt;/a&gt;)</span></li>
<li class="spam-spam"><a href="/spam/node/612/spam" class="spam-spam">mark as spam</a></li>
<li class="spam-report"><a href="/spam/report/node/612" class="spam-report">report as spam</a></li>

This happens in both the Bluebreeze theme and Garland theme, and in FireFox and Internet Explorer.

Comments

Alfonso Knaf’s picture

I can confirm this bug. It is not more than an annoyance but it would be nice if there were a solution ;-)

jacobjanzen’s picture

I get the same problem in marvin theme.

Could this be fixed?

Thanks,

Jake

VDG’s picture

The problem is the function theme_spam_link($content, $type = 'comment'), where the link is mangled through check_plain. Any further ideas?

mercmobily’s picture

Hi,

Something weird: I installed a new site, and the problem doesn't seem to be there. Does this happen only with specific themes? Or when a site is imported?

Is anybody listening here?

Merc.

jaydub’s picture

Status: Active » Needs review
StatusFileSize
new989 bytes

in drupal 5.x the handling of links from hook_link has changed. If you want to show markup in the display portion of a link, you need to feed an element to the array passed to the l() function. If you add 'html' => TRUE to the array fed to l() your display will show markup.

see attached patch that fixed this issue in spam.module

jeremy’s picture

Status: Needs review » Fixed

Thanks jaydub, patch applied. I also fixed the link to go to the correct url.

mercmobily’s picture

Hi,

Which version has the fix?

Merc.

Anonymous’s picture

Status: Fixed » Closed (fixed)