fixup! Fix the XmlTraceLogFormatter (#7322)
* fixup! Fix the XmlTraceLogFormatter The original escape process uses a `loop` while the code is actually not an ACTOR. So the actorcompiler is not reacting. This causes the escape not escaping the XML fields properly. * fixup! Reformat source
This commit is contained in:
parent
e632aef1c7
commit
5a2804e04b
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
#include "flow/flow.h"
|
#include "flow/flow.h"
|
||||||
#include "flow/XmlTraceLogFormatter.h"
|
#include "flow/XmlTraceLogFormatter.h"
|
||||||
#include "flow/actorcompiler.h"
|
|
||||||
|
|
||||||
void XmlTraceLogFormatter::addref() {
|
void XmlTraceLogFormatter::addref() {
|
||||||
ReferenceCounted<XmlTraceLogFormatter>::addref();
|
ReferenceCounted<XmlTraceLogFormatter>::addref();
|
||||||
|
@ -43,7 +42,7 @@ const char* XmlTraceLogFormatter::getFooter() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmlTraceLogFormatter::escape(std::ostringstream& oss, std::string source) const {
|
void XmlTraceLogFormatter::escape(std::ostringstream& oss, std::string source) const {
|
||||||
loop {
|
for (;;) {
|
||||||
int index = source.find_first_of(std::string({ '&', '"', '<', '>', '\r', '\n', '\0' }));
|
int index = source.find_first_of(std::string({ '&', '"', '<', '>', '\r', '\n', '\0' }));
|
||||||
if (index == source.npos) {
|
if (index == source.npos) {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue