From 9af4846372f4b3160f45bd081b170f31615f878b Mon Sep 17 00:00:00 2001 From: Molkobain Date: Tue, 23 Mar 2021 16:39:22 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B03810=20-=20Avoid=20syntax=20highlighting?= =?UTF-8?q?=20that=20shouldn't=20take=20place?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/itopwebpage.class.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index fdd00e4a1..a46794da3 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -354,14 +354,15 @@ JS ); // Highlight code content created with CKEditor + // Note: We check for the tag inside the
 tag to only target code from CKEditor, otherwise we might highlight some others things. See N°3810
 		$this->add_ready_script(
 			<< code").parent().each(function(i, block) {
             hljs.highlightBlock(block);
         });        
 		// Highlight code content for CaseLogs
-		$("[data-attribute-type='AttributeCaseLog'] .caselog_entry_html pre").each(function(i, block) {
+		$("[data-attribute-type='AttributeCaseLog'] .caselog_entry_html pre > code").parent().each(function(i, block) {
             hljs.highlightBlock(block);
         });
 JS