--- lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm.orig 2012-02-26 23:37:29.000000000 +0100
+++ lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm 2012-02-26 23:51:22.000000000 +0100
@@ -1372,6 +1372,12 @@
if ( $text eq $href ) {
return ( 0, $WC::CHECKw . '[' . $nop . '[' . $href . ']]' );
}
+ # we must quote square brackets in [[...][...]] notation
+ $text =~ s/[[]/[/g;
+ $text =~ s/[]]/]/g;
+ $href =~ s/[[]/%5B/g;
+ $href =~ s/[]]/%5D/g;
+
return ( 0,
$WC::CHECKw . '[' . $nop . '[' . $href . '][' . $text . ']]' );
}