http://gwt-code-reviews.appspot.com/771801/diff/1/10 File user/src/com/google/gwt/safehtml/shared/EscapeUtils.java (right):
http://gwt-code-reviews.appspot.com/771801/diff/1/10#newcode21 user/src/com/google/gwt/safehtml/shared/EscapeUtils.java:21: public final class EscapeUtils { On 2010/08/16 23:39:47, tbroyer wrote:
Why is this not called HtmlUtils? (wrt UriUtils)
Fixed. Changed to SafeHtmlUtils. http://gwt-code-reviews.appspot.com/771801/diff/1/10#newcode29 user/src/com/google/gwt/safehtml/shared/EscapeUtils.java:29: * Returns a SafeHtml constructed from a safe string, i.e. without escaping On 2010/08/17 20:47:22, xtof wrote:
This method's doc should stipulate the same constraints on its
argument as does
SafeHtmlBuilder#appendHtmlConstant(String).
Fixed. http://gwt-code-reviews.appspot.com/771801/diff/1/10#newcode51 user/src/com/google/gwt/safehtml/shared/EscapeUtils.java:51: // TODO(pdr): This needs to be profiled to see if it is useful or not. On 2010/08/16 23:39:47, tbroyer wrote:
See how Closure Library does this, and the note about performance in
the doc: http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/string/string.js#443 Fixed. Thank you for the Closure link, it was a huge help. I was doing it a suboptimal way, but it has been fixed with ideas from Closure's method, plus some additional performance testing. (see the large comment block in SafeHtmlUtils for details.) http://gwt-code-reviews.appspot.com/771801/diff/1/14 File user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java (right): http://gwt-code-reviews.appspot.com/771801/diff/1/14#newcode116 user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java:116: * Boolean and numeric types converted to String are always HTML safe -- no On 2010/08/17 20:47:22, xtof wrote:
This comment should go above all the append(boolean/numeric type)
methods (I
think methods got reordered)?
Fixed. http://gwt-code-reviews.appspot.com/771801/diff/1/28 File user/test/com/google/gwt/safehtml/shared/SafeHtmlBuilderTest.java (right): http://gwt-code-reviews.appspot.com/771801/diff/1/28#newcode41 user/test/com/google/gwt/safehtml/shared/SafeHtmlBuilderTest.java:41: new SafeHtmlBuilder().appendHtmlConstant("Yabba dabba & doo\n").appendEscaped("What's up so&so\n").append(html); On 2010/08/17 20:47:22, xtof wrote:
Line length?
Fixed. http://gwt-code-reviews.appspot.com/771801/diff/13001/14008 File user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java (right): http://gwt-code-reviews.appspot.com/771801/diff/13001/14008#newcode47 user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java:47: return new SafeHtmlString(s); On 2010/08/18 15:01:30, jlabanca wrote:
Add TODO to check second constraint in hosted mode.
Fixed http://gwt-code-reviews.appspot.com/771801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
