Could someone add some debug output warning for stripped tags that
looks like open close tags  ;]]]

2010/7/27 Martin Grigorov <[email protected]>:
> Accoring to
> org.apache.wicket.markup.html.IHeaderResponse.renderString(CharSequence)
> javadoc:
>
> /**
>  * Renders an arbitrary string to the header. The string is only rendered if
> the same string
>  * hasn't been rendered before.
>
> Each sequence is rendered only once! So you need to pass the whole CSS in
> one pass: open+body+close
>
> On Tue, Jul 27, 2010 at 5:48 PM, Martin Makundi <
> [email protected]> wrote:
>
>> Hi!
>>
>> Is it abug or a feature that if I have the following:
>>
>>  public void renderHead(IHeaderResponse response) {
>>      // Tweak 1
>>      response.renderString(CssUtils.INLINE_OPEN_TAG);
>>      response.renderString("div.upper-background-canvas { background:
>> url(/images/template-bg.png) repeat-x rgb(55,115,130); } body {
>> background: none rgb(68,68,20); } ");
>>      response.renderString(CssUtils.INLINE_CLOSE_TAG);
>>      // Tweak 2
>>      response.renderString(CssUtils.INLINE_OPEN_TAG);
>>      response.renderString("div.container-panel { width: 98%; }");
>>      response.renderString(CssUtils.INLINE_CLOSE_TAG);
>>  }
>>
>> The result rendered in browser is:
>> <style type="text/css"><!--
>> div.upper-background-canvas { background: url(/images/template-bg.png)
>> repeat-x rgb(55,115,130); } body { background: none rgb(68,68,20); }
>> --></style>
>> div.container-panel { width: 98%; }
>>
>> This seems sensless... it considers the css script open/close tags
>> duplicate and drops them from the rendering phase. I will do the same
>> for any javascript line? For example if I had "alert(value);" in
>> multiple places it would just strip them and I would get bizzearre
>> results?
>>
>> Seems a bit over-optimized to me .... what do you think?
>>
>>
>> **
>> Martin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to