Skip to content
Permalink
Browse files

Item12842: need to pick <nop> out separately as it may be nested insi…

…de a HTML tag without a problem

git-svn-id: http://svn.foswiki.org/trunk@17513 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
MichaelDaum MichaelDaum
MichaelDaum authored and MichaelDaum committed Apr 4, 2014
1 parent 6ddbabb commit 583469031479047f51ca7fa93b0b935a941d5f39
Showing with 8 additions and 0 deletions.
  1. +4 −0 core/lib/Foswiki/Macros/TOC.pm
  2. +4 −0 core/lib/Foswiki/Render/Anchors.pm
@@ -188,6 +188,10 @@ sub TOC {
$text =~ s/(^|[\s\(])=+([^\s]+?|[^\s].*?[^\s])=+
($|[\s\,\.\;\:\!\?\)])/$1$2$3/gx;

# need to pick <nop> out separately as it may be nested
# inside a HTML tag without a problem
$text =~ s/<nop>//g;

# Prevent manual links
$text =~ s/<[\/]?a\b[^>]*>//gi;

@@ -155,6 +155,10 @@ sub make {
# remove double bracket link
$text =~ s/\[(?:\[.*?\])?\[(.*?)\]\s*\]/$1/g;

# need to pick <nop> out separately as it may be nested
# inside a HTML tag without a problem
$text =~ s/<nop>//g;

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

0 comments on commit 5834690

Please sign in to comment.
You can’t perform that action at this time.