mirror of https://github.com/M66B/FairEmail.git
Fixed linking of images
This commit is contained in:
parent
be7fc8d70c
commit
4d57c6356a
|
@ -420,26 +420,6 @@ public class HtmlEx {
|
|||
out.append(((URLSpan) style[j]).getURL());
|
||||
out.append("\">");
|
||||
}
|
||||
if (style[j] instanceof ImageSpan) {
|
||||
out.append("<img src=\"");
|
||||
out.append(((ImageSpan) style[j]).getSource());
|
||||
out.append("\"");
|
||||
|
||||
if (style[j] instanceof ImageSpanEx) {
|
||||
ImageSpanEx img = (ImageSpanEx) style[j];
|
||||
int w = img.getWidth();
|
||||
if (w > 0)
|
||||
out.append(" width=\"").append(w).append("\"");
|
||||
int h = img.getHeight();
|
||||
if (h > 0)
|
||||
out.append(" height=\"").append(h).append("\"");
|
||||
}
|
||||
|
||||
out.append(">");
|
||||
|
||||
// Don't output the dummy character underlying the image.
|
||||
i = next;
|
||||
}
|
||||
if (style[j] instanceof AbsoluteSizeSpan) {
|
||||
AbsoluteSizeSpan s = ((AbsoluteSizeSpan) style[j]);
|
||||
float sizeDip = s.getSize();
|
||||
|
@ -475,6 +455,29 @@ public class HtmlEx {
|
|||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < style.length; j++) {
|
||||
if (style[j] instanceof ImageSpan) {
|
||||
out.append("<img src=\"");
|
||||
out.append(((ImageSpan) style[j]).getSource());
|
||||
out.append("\"");
|
||||
|
||||
if (style[j] instanceof ImageSpanEx) {
|
||||
ImageSpanEx img = (ImageSpanEx) style[j];
|
||||
int w = img.getWidth();
|
||||
if (w > 0)
|
||||
out.append(" width=\"").append(w).append("\"");
|
||||
int h = img.getHeight();
|
||||
if (h > 0)
|
||||
out.append(" height=\"").append(h).append("\"");
|
||||
}
|
||||
|
||||
out.append(">");
|
||||
|
||||
// Don't output the dummy character underlying the image.
|
||||
i = next;
|
||||
}
|
||||
}
|
||||
|
||||
withinStyle(out, text, i, next);
|
||||
|
||||
for (int j = style.length - 1; j >= 0; j--) {
|
||||
|
|
Loading…
Reference in New Issue