Done & re-snapshotted.

What else?


http://codereview.appspot.com/126062/diff/2028/3034
File tests/com/google/caja/plugin/templates/TemplateCompilerTest.java
(right):

http://codereview.appspot.com/126062/diff/2028/3034#newcode342
Line 342: htmlFragment(fromString("<span/>")),
On 2009/10/15 19:31:59, MikeSamuel wrote:
On 2009/10/13 22:21:17, ihab.awad wrote:
> On 2009/10/09 02:31:44, MikeSamuel wrote:
> > Why is this span here?
>
> Because SafeHtmlMaker, as modified, returns an empty <span> for the
static
HTML
> if it is asked to emit only JS. Why, you ask? Well....
>
> SafeHtmlMaker emits a Pair containing a Node and a list of JS
Blocks. For the
> Node, I could either return something benign (like the <span>) or
return null.
I
> chose to return the <span> to guard against NPEs in clients that may
assume
> there is always HTML anyway -- in other words, the output will
"work"
regardless
> of how it's used.

Please return an empty document fragment instead.


Done.

http://codereview.appspot.com/126062

Reply via email to