This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-371
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-371 by this push:
     new e8fe512  WIP on NLPCRAFT-371.
e8fe512 is described below

commit e8fe512de2500b8cbddbeb6a17fcbc3b5d2d867d
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Sat Jul 24 17:10:19 2021 -0700

    WIP on NLPCRAFT-371.
---
 nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala | 4 ++++
 .../src/test/scala/org/apache/nlpcraft/server/rest/NCRestSpec.scala   | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
index 4503970..a1c8f97 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
@@ -1667,6 +1667,10 @@ object NCUtils extends LazyLogging {
         else
             try
                 
GSON.toJson(GSON.getAdapter(classOf[JsonElement]).fromJson(json))
+                    // Fix the problem with escaping '<' and '>' which is only
+                    // a theoretical problem for browsers displaying JSON.
+                    .replace("\\u003c", "<")
+                    .replace("\\u003e", ">")
             catch {
                 case _: Exception => ""
             }
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/server/rest/NCRestSpec.scala 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/server/rest/NCRestSpec.scala
index 03bf811..cb7d075 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/server/rest/NCRestSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/server/rest/NCRestSpec.scala
@@ -32,7 +32,6 @@ import org.junit.jupiter.api.Assertions._
 import org.junit.jupiter.api.{AfterEach, BeforeEach}
 
 import java.util
-import java.util.{List => JList}
 import java.util.UUID
 
 import scala.jdk.CollectionConverters.{ListHasAsScala, MapHasAsJava, 
MapHasAsScala, SeqHasAsJava}

Reply via email to