From c60e76906060423a232ecc8ad828925a638d0fa5 Mon Sep 17 00:00:00 2001
From: Urban Müller
Date: Mon, 19 Aug 2024 02:21:56 +0200
Subject: fewer backslackes when ED()-ing html content with debug output
---
it_html.class | 2 +-
it_text.class | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/it_html.class b/it_html.class
index 71853dd..ec1e1ce 100644
--- a/it_html.class
+++ b/it_html.class
@@ -423,7 +423,7 @@ static function sanitize($html)
else
$result = it::replace(array('&(#\d+;)' => '&$1'), it_html::Q(html_entity_decode(strip_tags($html), ENT_COMPAT, $charset)));
- return $GLOBALS['debug_q'] ? "$result" : it::replace(array('<(div|p|i|b|a)>\1>' => ""), $result); # remove empty tags
+ return $GLOBALS['debug_q'] ? "$result" : it::replace(array('<(div|p|i|b|a)>\1>' => ""), $result); # remove empty tags
}
/**
diff --git a/it_text.class b/it_text.class
index e08fff0..78df85b 100644
--- a/it_text.class
+++ b/it_text.class
@@ -149,7 +149,7 @@ function text($label, $language = null)
if ($GLOBALS['debug_texts'] && !preg_match('/submit|button|servicedomain/i', $label) && (!$_GET['it_texts_mark'] || $label == $_GET['it_texts_mark']))
{
- $text = "1, 'skipfiles'=>"text|auto_prepend")) . ")'>" . ($text ? $text : $label) . " '.'], U(it::replace(['^///' => '/'], '//' . $this->label_to_service[$label] . '/admin/texts'), ['edit' => $label])) . "'>.";
+ $text = "1, 'skipfiles'=>"text|auto_prepend")) . ')">' . ($text ? $text : $label) . " '.'], U(it::replace(['^///' => '/'], '//' . $this->label_to_service[$label] . '/admin/texts'), ['edit' => $label])) . '">.';
}
if (isset($GLOBALS['it_text_sampling']))
--
cgit v1.2.3