We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77c50cd commit 17a7d7cCopy full SHA for 17a7d7c
React.php
@@ -97,7 +97,8 @@ function render(){
97
$attributes = implode(' ',$attr);
98
99
//if theres innerHtml then ignore children else escape any string passed as html
100
- $children = $innerHtml ? [$innerHtml] : array_map(function($v){ return is_string($v) ? htmlspecialchars($v) : $v; }, $this->children);
+ $children = $innerHtml ? [$innerHtml] :
101
+ array_map(function($v)use($tag){ return is_string($v) && $tag!='script' ? htmlspecialchars($v) : $v; }, $this->children);
102
$children = implode('', $children);
103
104
return "<$tag $attributes>$children</$tag>";
0 commit comments