mirror of https://notabug.org/acetone/ircabot.git
Long search request cant break page
parent
aaee3a7f9d
commit
cfcf3a01b9
|
@ -1024,7 +1024,14 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead
|
|||
}
|
||||
}
|
||||
}
|
||||
middlePath += " " + searchRequest + " ";
|
||||
int lastWbr = 0;
|
||||
for (int i = 0; i < searchRequest.size(); i++) {
|
||||
if (i-lastWbr > MAX_MESSAGE_LENGTH_WITHOUT_WBR) {
|
||||
searchRequest.insert(i, "<wbr>");
|
||||
lastWbr = i;
|
||||
}
|
||||
}
|
||||
middlePath += " <span style=\"color: #4f9c65\">" + searchRequest + "</span> ";
|
||||
if (rgxIsValid) middlePath += "rgx";
|
||||
middlePath += "(" + QString::number(counter) + ")";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue