summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-07-07 15:42:05 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-07-07 15:42:05 -0700
commit878ad18ca03c7634f6483440852b0ad9279ad4ca (patch)
tree6c2536d7bf4c941ac846c87599f50db24e391fd1 /src
parent02ef9ba1e3c0ed7ab7327c396e9e4b01906437eb (diff)
downloadvyatta-op-vpn-878ad18ca03c7634f6483440852b0ad9279ad4ca.tar.gz
vyatta-op-vpn-878ad18ca03c7634f6483440852b0ad9279ad4ca.zip
Fix 3194: VPN: xml error in "show vpn ike" command output
Diffstat (limited to 'src')
-rw-r--r--src/rl_str_proc.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rl_str_proc.cc b/src/rl_str_proc.cc
index ce28f37..2ee9a5c 100644
--- a/src/rl_str_proc.cc
+++ b/src/rl_str_proc.cc
@@ -25,6 +25,14 @@ StrProc::StrProc(const string &in_str, const string &token)
pos += tabtospace.length();
}
+ // convert & to &amp;
+ string amp = "&amp;";
+ pos = 0;
+ while ((pos = tmp.find("&", pos)) != string::npos) {
+ tmp.replace(pos, 1, amp);
+ pos += amp.length();
+ }
+
//remove the cr
pos = tmp.find("\n");
if (pos != string::npos) {