In console, there is the print and the return value with " around
?? In the mail,there is the print and the return value with NO " around??
?? We have to make this consistant by founding why there are " around in the console and doing the same in the mail??
When the script fail, I receive a success mail with empty console.
?? I should receive an error mail with the exception visible??
For both comments, the problem is that the console in the tool is formatted into HTML with Ametys.plugins.coreui.script.ScriptToolHelper#formatConsoleOutput
But for the async execution, it is on server side, I cannot call client-side code or duplicate it
What do you think we should do ? Maybe not format with JS code but with i18n catalogue to be common ? But the formatting options will be limited and the client side will be less beautiful than before..I don't know
Code & Functional review ok
But a bug:
The following script
return contents([], selection)
is working in the cms in synchrone but not in asynchrone.