Subject: | Escaping of Confluence special characters |
Confluence output is much garbled without it (try any random POD
documentation). Probably even more characters need to be escaped.
Subject: | perl-Pod-Simple-Wiki-0.09-escape.patch |
Escape some characters, also in titles.
Lubomir Rintel <lkundrak@v3.sk>
--- Pod-Simple-Wiki-0.09/lib/Pod/Simple/Wiki/Confluence.pm.escape 2008-05-24 07:56:48.000000000 +0200
+++ Pod-Simple-Wiki-0.09/lib/Pod/Simple/Wiki/Confluence.pm 2008-08-29 10:09:44.000000000 +0200
@@ -96,16 +96,11 @@
my $self = shift;
my $text = $_[0];
- # Only escape words in paragraphs
- if (not $self->{_in_Para}) {
- $self->{_wiki_text} .= $text;
- return;
- }
-
# Split the text into tokens but maintain the whitespace
my @tokens = split /(\s+)/, $text;
# Escape any tokens here, if necessary.
+ @tokens = map { s/([\[\{-])/\\$1/g; $_ } @tokens;
# Rejoin the tokens and whitespace.
$self->{_wiki_text} .= join '', @tokens;