mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
check for html tags and append "%html "
This commit is contained in:
parent
c58eae7b33
commit
756558ed90
1 changed files with 9 additions and 2 deletions
|
|
@ -223,8 +223,15 @@ public class LivyHelper {
|
|||
return new InterpreterResult(Code.ERROR, errorMessage.toString());
|
||||
}
|
||||
if (((Map) jsonMap.get("output")).get("status").equals("ok")) {
|
||||
return new InterpreterResult(Code.SUCCESS,
|
||||
(String) ((Map) ((Map) jsonMap.get("output")).get("data")).get("text/plain"));
|
||||
String result = (String) ((Map) ((Map) jsonMap.get("output"))
|
||||
.get("data")).get("text/plain");
|
||||
if (result.startsWith("<link")
|
||||
|| result.startsWith("<script")
|
||||
|| result.startsWith("<style")
|
||||
|| result.startsWith("<div")) {
|
||||
result = "%html " + result;
|
||||
}
|
||||
return new InterpreterResult(Code.SUCCESS, result);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue