From: Simon McVittie Date: Sun, 23 Nov 2008 12:03:05 +0000 (+0000) Subject: comments: Use HTML entities to escape directives X-Git-Tag: 2.71~124 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/3abfc1d71c914035deff75a4373041cb9962a471?ds=sidebyside;hp=-c comments: Use HTML entities to escape directives --- 3abfc1d71c914035deff75a4373041cb9962a471 diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index acc3ffdb3..a68026ebc 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -221,11 +221,11 @@ sub sessioncgi ($$) { #{{{ unless ($allow_directives) { # don't allow new-style directives at all - $body =~ s/(^|[^\\])\[\[!/$1\\[[!/g; + $body =~ s/(^|[^\\])\[\[!/$1[[!/g; # don't allow [[ unless it begins an old-style # wikilink, if prefix_directives is off - $body =~ s/(^|[^\\])\[\[(?![^\n\s\]+]\]\])/$1\\[[!/g + $body =~ s/(^|[^\\])\[\[(?![^\n\s\]+]\]\])/$1[[!/g unless $config{prefix_directives}; }