On master (6621be53517d69ab855cee4a5978a44d6a133ba3), warnings that contain <hr /> HTML tag are not displayed correctly:

Fixed:

On master (6621be53517d69ab855cee4a5978a44d6a133ba3), warnings that contain <hr /> HTML tag are not displayed correctly:

Fixed:

134 | @@ -135,7 +135,7 @@ BitcoinCore::BitcoinCore(interfaces::Node& node) : 135 | void BitcoinCore::handleRunawayException(const std::exception *e) 136 | { 137 | PrintExceptionContinue(e, "Runaway exception"); 138 | - Q_EMIT runawayException(QString::fromStdString(m_node.getWarnings())); 139 | + Q_EMIT runawayException(QString::fromStdString(m_node.getWarnings()).replace("<hr />", "\n\n"));
So we have
https://github.com/bitcoin/bitcoin/blob/88b2652fadf6e004e751d48884ae8d4cf5c452b8/src/warnings.h#L17
Would it be better to extract the warning_separator variable into a global constant and use it here instead of hardcoding "<hr />" in both places?
Even better would be to return a vector of strings instead of multiple strings concatenated to each other with "<hr />", but that would be a much bigger change, I am not suggesting to do it here in this PR.
... a much bigger change...
That was my concern too :)
Should the following be adjusted too?
Should the following be adjusted too?
No. It is for status bar:

Is there a specific way to trigger a runaway exception?
Concept ACK
Took a crack at an alternative and it seems reasonable to me: https://github.com/bitcoin/bitcoin/compare/master...Empact:200506-no-html
Updated 1b87b55f08ed11e5aba63e49397cf294aaf3ff8f -> a9d28afe23a94efdccc53f9f10716f3a0c9337eb (pr18898.01 -> pr18898.02, diff):
The OP has been updated.
Reopened to update Travis CI build list.
Does simply replacing the newlines at the end with a HTML <br /> fix the <tr/> problem?
Does simply replacing the newlines at the end with a HTML
<br />fix the<tr/>problem?
Sorry. Mind rewording your question?
Sorry. Mind rewording your question?
Sorry if it was not clear.
You're only changing the \n to <br />. You write in the PR description that is solves the <hr /> issue (display a line instead of the plaintext html tag). I wonder why adding a <br> should make it rich text. Can you explain?
You're only changing the
\nto<br />. You write in the PR description that is solves the<hr />issue (display a line instead of the plaintext html tag). I wonder why adding a<br>should make it rich text. Can you explain?
From QMessageBox class docs:
The main text and informative text properties can be either plain text or rich text. These strings are interpreted according to the setting of the text format property. The default setting is auto-text.
As we do not have means to set Qt::RichText instead of Qt::AutoText directly, replacing s/\n/<br>/ forces the text string to be interpreted as a rich text.
Now I understand. utACK a9d28afe23a94efdccc53f9f10716f3a0c9337eb
Code review ACK a9d28afe23a94efdccc53f9f10716f3a0c9337eb.