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