filter special ascii commands from output, otherwise jenkins cannot read the test output xml file

master
Marc Wäckerlin 8 years ago
parent 52087c3906
commit d991ec9133
  1. 11
      src/commands.hxx

@ -436,11 +436,8 @@ class Script: public QObject {
};
public:
static QString xmlattr(QString attr, bool br = false) {
attr.replace("&", "&")//.replace(" ", " ")
.replace("\"", """);
if (br) attr.replace("\n", "<br/>");
attr.replace("<", "&lt;").replace(">", "&gt;");
return attr;
if (br) return attr.toHtmlEscaped().replace("\n", "<br/>");
return attr.toHtmlEscaped();
}
static QString xmlstr(const std::string& attr) {
return xmlstr(QString::fromStdString(attr));
@ -899,6 +896,7 @@ class Script: public QObject {
QString prefix
(QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss "));
Command* cmd(command?command:_command);
for (QChar& c: text) if (c<32) c='?';
if (cmd)
prefix += QString("%2:%3%1 ")
.arg(QString(cmd->indent(), QChar(' ')))
@ -2105,7 +2103,8 @@ class If: public Command {
"less (as integer), bigger (as integer). "
"Match allows a regular expression. "
"The second variant checks for a text in a selector, "
"similar to command exists. "
"similar to command exists. The text can be empty to just "
"check for the existence of a selector. "
"There is an optional else part.";
}
QString command() const {

Loading…
Cancel
Save