* [PATCH proxmox-widget-toolkit] utils: fix multi line error message rendering for store error mask
@ 2026-10-15 15:11 Christian Ebner
2026-10-29 19:27 ` applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2026-10-15 15:11 UTC (permalink / raw)
To: pve-devel
Since commit 86b2264d ("utils: mon store errors: htmlEncode error
message") the full message passed to the error mask is html encoded.
This however leads to incorrect rendering of multiline errors, since
gathered via Proxmox.Utils.getResponseErrorMessage() separates lines
via `<br>` tag and already html encodes them. One crucial exception
is however the error status text, not covered by html encoding in
Proxmox.Utils.getResponseErrorMessage().
Since the current implementation breaks multi-line error rendering
for several places in the PBS UI, fix the rendering by not encoding
the full return value of Proxmox.Utils.getResponseErrorMessage(),
but rather limit to the content of the error itself.
Fixes:86b2264d ("utils: mon store errors: htmlEncode error message")
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
src/Utils.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Utils.js b/src/Utils.js
index cd24787..73189fd 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -414,7 +414,7 @@ Ext.define('Proxmox.Utils', {
if (!err.statusText) {
return gettext('Connection error');
}
- let msg = [`${err.statusText} (${err.status})`];
+ let msg = [Ext.String.htmlEncode(`${err.statusText} (${err.status})`)];
if (err.response && err.response.responseText) {
let txt = err.response.responseText;
try {
@@ -468,7 +468,7 @@ Ext.define('Proxmox.Utils', {
let error = request._operation.getError();
let msg = Proxmox.Utils.getResponseErrorMessage(error);
if (!errorCallback || !errorCallback(error, msg)) {
- Proxmox.Utils.setErrorMask(component, Ext.htmlEncode(msg));
+ Proxmox.Utils.setErrorMask(component, msg);
}
});
},
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* applied: [PATCH proxmox-widget-toolkit] utils: fix multi line error message rendering for store error mask
2026-10-15 15:11 [PATCH proxmox-widget-toolkit] utils: fix multi line error message rendering for store error mask Christian Ebner
@ 2026-10-29 19:27 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-10-29 19:27 UTC (permalink / raw)
To: pve-devel, Christian Ebner
On Thu, 15 Oct 2026 17:11:10 +0200, Christian Ebner wrote:
> Since commit 86b2264d ("utils: mon store errors: htmlEncode error
> message") the full message passed to the error mask is html encoded.
>
> This however leads to incorrect rendering of multiline errors, since
> gathered via Proxmox.Utils.getResponseErrorMessage() separates lines
> via `<br>` tag and already html encodes them. One crucial exception
> is however the error status text, not covered by html encoding in
> Proxmox.Utils.getResponseErrorMessage().
>
> [...]
Applied, thanks!
[1/1] utils: fix multi line error message rendering for store error mask
commit: d353f9466dee3e6c35a8af26e83899a6a580169c
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-29 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 15:11 [PATCH proxmox-widget-toolkit] utils: fix multi line error message rendering for store error mask Christian Ebner
2026-10-29 19:27 ` applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox