Closed
Description
- This is a bug
- This is a modification request
Code
Reproduced in the CRA webpack 5 update branch using webpack error overlay in the WP5 CRA pr (replacing the CRA error overlay)
(The "wp5" branch is on the way to "main")
Expected Behavior
Actual Behavior
For Bugs; How can we reproduce the behavior?
ansiHTML returns error formattet using html as a text string but because it's handed of to document.createTextNode the browser will escape the string problem is that errorMessage
is already escaped (as it should be to prevent XSS/script injection) so no need for the double escaping.
Suggestion:
Change
...
const text = ansiHTML(errorMessage);
const messageTextNode = document.createTextNode(text);
...
To:
...
var text = ansiHTML(encode(errorMessage));
var messageTextNode = document.createElement('div');
messageTextNode.innerHTML = text;
...
For Features; What is the motivation and/or use-case for the feature?
Metadata
Metadata
Assignees
Labels
No labels