summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scilab/modules/graph/src/java/org/scilab/modules/graph/view/SupportedLabelType.java27
1 files changed, 14 insertions, 13 deletions
diff --git a/scilab/modules/graph/src/java/org/scilab/modules/graph/view/SupportedLabelType.java b/scilab/modules/graph/src/java/org/scilab/modules/graph/view/SupportedLabelType.java
index b987124..e5a790d 100644
--- a/scilab/modules/graph/src/java/org/scilab/modules/graph/view/SupportedLabelType.java
+++ b/scilab/modules/graph/src/java/org/scilab/modules/graph/view/SupportedLabelType.java
@@ -89,23 +89,24 @@ public enum SupportedLabelType {
89 public static SupportedLabelType getFromHTML(String html) { 89 public static SupportedLabelType getFromHTML(String html) {
90 if (html.length() > 0 && html.charAt(0) == '<') { 90 if (html.length() > 0 && html.charAt(0) == '<') {
91 91
92 StringBuilder content; 92 final StringBuilder content = new StringBuilder(mxUtils
93 content = new StringBuilder(mxUtils.getBodyMarkup(html, false)); 93 .getBodyMarkup(html, false));
94 94
95 ScilabGraphUtils.removeBlanks(content); 95 ScilabGraphUtils.removeBlanks(content);
96 96
97 if ((content.charAt(0) == LATEX_TAG) && ( 97 if ((content.length() > 0) && (content.charAt(0) == LATEX_TAG)
98 content.charAt(content.length() - 1) == LATEX_TAG)) { 98 && (content.charAt(content.length() - 1) == LATEX_TAG)) {
99 return Latex; 99 return Latex;
100 } else if ((content.charAt(0) == MATHML_TAG) && ( 100 } else if ((content.length() > 0)
101 content.charAt(content.length() - 1) == MATHML_TAG)) { 101 && (content.charAt(0) == MATHML_TAG)
102 LoadClassPath.loadOnUse(CLASSPATH_MATHML_NAME); 102 && (content.charAt(content.length() - 1) == MATHML_TAG)) {
103 return MathML; 103 LoadClassPath.loadOnUse(CLASSPATH_MATHML_NAME);
104 } 104 return MathML;
105 }
105 } else { 106 } else {
106 return getFromText(html); 107 return getFromText(html);
107 } 108 }
108 109
109 return HTML; 110 return HTML;
110 } 111 }
111 112