erp5_test_result: change TestResultLine_view to correctly render in ERP5JS
Use editor gadget to render the output as raw data. Use the page class to improve xhtml style rendering
-
Developer
@romain : in
TestResultLine_view
for functional tests, we lost the red coloring of the step that failed. ie:https://erp5js.nexedi.net/#/test_result_module/20210908-5AB3C3CE/207
Could it come from this commit ?
/cc @xiaowu.zhang
-
Developer
probably not, because i remember that red coloring for failed step is no longer available since long long time
because inline styles is not allowed by our CSP
-
Developer
Was it also the case for xhtml_style :
https://erp5.nexedi.net/test_result_module/20210908-5AB3C3CE/207 ?
(sorry, I should have pasted this link first, I don't know why I shared the renderjs one...)
-
Developer
-
Owner
I wrote the html viewer to add another security layer to prevent XSS injection.
We use CSP in erp5js to drop inline CSS style.
The HTML viewer also explicitely drop the STYLE element before injecting the HTML into the DOM.
Allowing any external CSS style can lead to interesting behaviour like a keylogger in pure CSS for example.
Please note that the html viewer has a compatibility with some inline CSS property, to allow displaying content created with CKEditor for example.
If you want to get back the red color in the test result display, I'm in favor of changing the HTML test result.