Skip to content

Commit

Permalink
Escape HTML special chars in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
samwilson authored Oct 28, 2023
1 parent 979eb53 commit a2d810f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Diagrams.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function renderLocally( string $commandName, string $input, array $params
);
if ( $result->getExitCode() !== 0 ) {
$errorMessage = wfMessage( 'diagrams-error-generic', $commandName )
. ' ' . $result->getStderr() ?? $result->getStdout();
. ' ' . htmlspecialchars( $result->getStderr() ?? $result->getStdout() );
return $this->formatError( $errorMessage );
}
$status = $this->isPreview
Expand Down

0 comments on commit a2d810f

Please sign in to comment.