diff --git a/src/fr/devinsy/xidyn/StringPresenter.java b/src/fr/devinsy/xidyn/StringPresenter.java index 9883930..3227f01 100644 --- a/src/fr/devinsy/xidyn/StringPresenter.java +++ b/src/fr/devinsy/xidyn/StringPresenter.java @@ -52,7 +52,11 @@ public class StringPresenter extends DomPresenter } else { - htmlSource = "\n" + html + ""; + StringBuffer buffer = new StringBuffer(html.length() + 100); + buffer.append("\n"); + buffer.append(html); + buffer.append(""); + htmlSource = buffer.toString(); } // StringBufferInputStream is deprecated so we use another solution. @@ -104,15 +108,6 @@ public class StringPresenter extends DomPresenter return (dynamize(datas.getIdsDataById())); } - /** - * - */ - public void setSource(final String html) - { - this.html = html; - this.doc = null; - } - /** * */ @@ -127,6 +122,15 @@ public class StringPresenter extends DomPresenter return (result); } + /** + * + */ + public void setSource(final String html) + { + this.html = html; + this.doc = null; + } + /** * Xid a string with html in. */