Skip to content

Commit

Permalink
Item9426: TOC is broken if FindElsewherePlugin has altered wikiword link
Browse files Browse the repository at this point in the history
I am reapplying filtering away square bracket links leaving only the visible part. 


git-svn-id: http://svn.foswiki.org/trunk@8399 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
KennethLavrsen authored and KennethLavrsen committed Aug 2, 2010
1 parent 2b59171 commit 506ab10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/lib/Foswiki/Render/Anchors.pm
Expand Up @@ -142,6 +142,10 @@ sub make {
$text =~ s/&lt;/</g;
$text =~ s/&gt;/>/g;

# strip out potential links so they don't get rendered.
# remove double bracket link
$text =~ s/\[(?:\[.*?\])?\[(.*?)\]\s*\]/$1/g;

# remove HTML tags and entities
$text =~ s/<\/?[a-zA-Z][^>]*>//gi;
$text =~ s/&#?[a-zA-Z0-9]+;//g;
Expand Down

0 comments on commit 506ab10

Please sign in to comment.