Item15015: Unable to escape the removal of bracket links in AttachContentPlugin
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: minor
--
BramVanOosterhout - 02 Feb 2021
AttachContentPlugin on Line 184 reads:
184 # Turn paragraphs, nops, and bracket links into plain text
185 unless ($keepPars) {
186 $content =~ s/<p\s*\/>/\n/go;
187 $content =~ s/<nop>//goi;
188 $content =~ s/\[\[.+?\]\[(.+?)\]\]/$1/go;
189 $content =~ s/\[\[(.+?)\]\]/$1/go;
190 }
This sequence prevent the escape of the conversion of bracket links to plain text. I.e. the sequence
[[
will not prevent the conversion.
I will change the sequence to:
184 # Turn paragraphs, nops, and bracket links into plain text
185 unless ($keepPars) {
186 $content =~ s/<p\s*\/>/\n/go;
187 $content =~ s/\[\[.+?\]\[(.+?)\]\]/$1/go;
188 $content =~ s/\[\[(.+?)\]\]/$1/go;
189 $content =~ s/<nop>//goi;
190 }
which will escape the sequence
[[
and hence prevent the conversion.
Implemented on 3 Feb 2012