If nothing is entered to override the link title, then no tokens are replaced for the link text.
The else clause in function ed_readmore_link_render($node, $display, $anchor) incorrectly includes the line to replace tokens for the link text:

if (empty($link_title)) {
    $link_title = t('Read the rest of !title.', array('!title' => $node->title));
  }
  // Replace tokens with values if the Token module and the token options are enabled.
  else if (module_exists('token') && variable_get('ed_readmore_tokens', TRUE)) {
   $link_text = token_replace($link_text, 'node', $node);  // <== this line shouldn't be here (aenw)
   $link_title = token_replace($link_title, 'node', $node);
  }

The line that replaces the tokens for $link_text should be moved up before the conditional test for (empty($link_title)). I don't know if the token_replace() call should go before the xss testing and code or after. And I don't have experience rolling a patch yet, else I'd do that.

(And this module is just the thing I need to make sure that the site I'm working on is as accessible as possible. Thanks!)

Comments

todd nienkerk’s picture

Assigned: Unassigned » todd nienkerk
Status: Active » Fixed

Good catch! I've changed the "else if" to a second "if" conditional, which should avoid this issue.

I will commit a fix shortly.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.