diff --git a/system/ThirdParty/Kint/Renderer/CliRenderer.php b/system/ThirdParty/Kint/Renderer/CliRenderer.php
index f86671ff1cf3..12b18d036b62 100644
--- a/system/ThirdParty/Kint/Renderer/CliRenderer.php
+++ b/system/ThirdParty/Kint/Renderer/CliRenderer.php
@@ -59,6 +59,15 @@ class CliRenderer extends TextRenderer
*/
public static $min_terminal_width = 40;
+ /**
+ * Which stream to check for VT100 support on windows.
+ *
+ * null uses STDOUT if it's defined
+ *
+ * @var null|resource
+ */
+ public static $windows_stream = null;
+
protected static $terminal_width = null;
protected $windows_output = false;
@@ -69,8 +78,22 @@ public function __construct()
{
parent::__construct();
- if (!self::$force_utf8) {
- $this->windows_output = KINT_WIN;
+ if (!self::$force_utf8 && KINT_WIN) {
+ if (!KINT_PHP72) {
+ $this->windows_output = true;
+ } else {
+ $stream = self::$windows_stream;
+
+ if (!$stream && \defined('STDOUT')) {
+ $stream = STDOUT;
+ }
+
+ if (!$stream) {
+ $this->windows_output = true;
+ } else {
+ $this->windows_output = !\sapi_windows_vt100_support($stream);
+ }
+ }
}
if (!self::$terminal_width) {
@@ -153,7 +176,7 @@ protected function utf8ToWindows($string)
{
return \str_replace(
['┌', '═', '┐', '│', '└', '─', '┘'],
- ["\xda", "\xdc", "\xbf", "\xb3", "\xc0", "\xc4", "\xd9"],
+ [' ', '=', ' ', '|', ' ', '-', ' '],
$string
);
}
diff --git a/system/ThirdParty/Kint/Renderer/RichRenderer.php b/system/ThirdParty/Kint/Renderer/RichRenderer.php
index 94b7f98ab71f..46a8827ded56 100644
--- a/system/ThirdParty/Kint/Renderer/RichRenderer.php
+++ b/system/ThirdParty/Kint/Renderer/RichRenderer.php
@@ -133,6 +133,9 @@ class RichRenderer extends Renderer
public static $always_pre_render = false;
+ public static $js_nonce = null;
+ public static $css_nonce = null;
+
protected $plugin_objs = [];
protected $expand = false;
protected $force_pre_render = false;
@@ -389,10 +392,18 @@ public function preRender()
switch ($type) {
case 'script':
- $output .= '';
+ $output .= '