Skip to content

Commit

Permalink
fix(FEC-10103): escape quotes with htmlspecialchars() (#4159)
Browse files Browse the repository at this point in the history
  • Loading branch information
yairans authored and OrenMe committed May 27, 2020
1 parent c402f6e commit 6bdbd67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mwEmbedLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function output(){

// check for non-fatal errors:
if( $this->getError() ){
echo "if( console ){ console.log('" . json_encode($this->getError()) . "'); }";
echo "if( console ){ console.log('" . json_encode(htmlspecialchars( is_string($this->getError()) ? $this->getError() : json_encode($this->getError()), ENT_QUOTES)) . "'); }";
}
// output the script output
echo $o;
Expand Down

0 comments on commit 6bdbd67

Please sign in to comment.