summaryrefslogtreecommitdiff
path: root/cpp/src/slice2confluence/ConfluenceOutput.cpp
diff options
context:
space:
mode:
authorShawn Hussey <shawn@zeroc.com>2011-09-06 11:05:15 -0230
committerShawn Hussey <shawn@zeroc.com>2011-09-06 11:05:15 -0230
commitbc9b9ac863b51e19a3d8667fd980a9086c6a1383 (patch)
tree519bdb8d0938c3e443c5980b6bc41a907ab15b02 /cpp/src/slice2confluence/ConfluenceOutput.cpp
parentFixed Slice comment markup. (diff)
downloadice-bc9b9ac863b51e19a3d8667fd980a9086c6a1383.tar.bz2
ice-bc9b9ac863b51e19a3d8667fd980a9086c6a1383.tar.xz
ice-bc9b9ac863b51e19a3d8667fd980a9086c6a1383.zip
Fixed markup escaping to use backslashes instead of entity codes.
Diffstat (limited to 'cpp/src/slice2confluence/ConfluenceOutput.cpp')
-rw-r--r--cpp/src/slice2confluence/ConfluenceOutput.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/cpp/src/slice2confluence/ConfluenceOutput.cpp b/cpp/src/slice2confluence/ConfluenceOutput.cpp
index 2f44679a474..cb28cd753b7 100644
--- a/cpp/src/slice2confluence/ConfluenceOutput.cpp
+++ b/cpp/src/slice2confluence/ConfluenceOutput.cpp
@@ -75,7 +75,7 @@ string
Confluence::ConfluenceOutput::escapeComment(string comment)
{
list< pair<unsigned int,unsigned int> > escaperLimits = getMarkerLimits(comment);
- string escapeChars = "\\{}-_*|[]";
+ string escapeChars = "\\{}-_+*|[]";
//for each escape character
for (string::iterator i = escapeChars.begin(); i < escapeChars.end(); ++i)
@@ -85,39 +85,43 @@ Confluence::ConfluenceOutput::escapeComment(string comment)
if (c == "\\")
{
- replacement = "&#92;";
+ replacement = "\\\\";
}
else if (c == "{")
{
- replacement = "&#123;";
+ replacement = "\\{";
}
else if (c == "}")
{
- replacement = "&#125;";
+ replacement = "\\}";
}
else if (c == "-")
{
- replacement = "&#45;";
+ replacement = "\\-";
}
else if (c == "*")
{
- replacement = "&#42;";
+ replacement = "\\*";
}
else if (c == "|")
{
- replacement = "&#124;";
+ replacement = "\\|";
}
else if (c == "_")
{
- replacement = "&#95;";
+ replacement = "\\_";
+ }
+ else if (c == "+")
+ {
+ replacement = "\\+";
}
else if (c == "[")
{
- replacement = "&#91;";
+ replacement = "\\[";
}
else if (c == "]")
{
- replacement = "&#93;";
+ replacement = "\\]";
}
size_t pos = comment.find(c);