From 6d15d7b1373b17c37828705db5a8110249c8887b Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 8 Jul 2024 05:24:22 +0300 Subject: [PATCH] implement setMono data method --- src/Entity/Browser/Container/Tab/Page/Content.php | 2 +- .../Browser/Container/Tab/Page/Content/Data.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Entity/Browser/Container/Tab/Page/Content.php b/src/Entity/Browser/Container/Tab/Page/Content.php index 5e224cd8..62c86d49 100644 --- a/src/Entity/Browser/Container/Tab/Page/Content.php +++ b/src/Entity/Browser/Container/Tab/Page/Content.php @@ -202,7 +202,7 @@ class Content default: - $this->data->setPlain( + $this->data->setMono( $response ); diff --git a/src/Entity/Browser/Container/Tab/Page/Content/Data.php b/src/Entity/Browser/Container/Tab/Page/Content/Data.php index 8341e215..b02cafc3 100644 --- a/src/Entity/Browser/Container/Tab/Page/Content/Data.php +++ b/src/Entity/Browser/Container/Tab/Page/Content/Data.php @@ -84,6 +84,20 @@ class Data ); } + public function setMono( + string $value + ): void + { + $this->gtk->set_markup( + sprintf( + '%s', + htmlspecialchars( + $value + ) + ) + ); + } + public function setGemtext( string $value, string | null &$title = null,