With the module enabled, non-shortcode words in brackets just disappear.

This shouldn't happen. If a word or phrase in brackets doesn't match any shortcodes, the module should just leave it alone.

I'm aware we can escape bracketed terms, but that should only be necessary for text that would ordinarily act as a shortcode.

Comments

spacegoat1701’s picture

I don't know if this is the best way, but I've added this to my copy of the module like so:

    $escaped = FALSE;
    if (!in_array(str_replace(array('[/', '[', ']'), '', $c), array_keys($shortcodes_enabled))) {
      $escaped = TRUE;
    }
    elseif ((substr($c, 0, 2) == '[[') && (substr($c, -2, 2) == ']]')) {
      $escaped = TRUE;
      // remove outer []
      $c = substr($c, 1, -1);
    }
denes.szabo’s picture

Status: Active » Fixed

Thanks for the error report!

I committed my solution http://drupalcode.org/project/shortcode.git/commit/cc90b069dd0eb1e4c869d....

Status: Fixed » Closed (fixed)

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