[ 
https://issues.apache.org/jira/browse/MYFACES-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884873#action_12884873
 ] 

Leonardo Uribe commented on MYFACES-2779:
-----------------------------------------

Checking this stuff I notice maybe there is a problem with how <script> stuff 
is handled by HtmlResponseWriterImpl.

The following code:

<script type="text/javascript">
   var b = 1;
</script>
<script type="text/javascript"><!--
   var b = 1;
//--></script>

In a facelets page is rendered in this way:

<script type="text/javascript"><!--

   var b = 1;

//--></script>
<script type="text/javascript"><!--
<!--
   var b = 1;
//-->
//--></script>

But checking what Mojarra does it renders something like this in facelets:

<script type="text/javascript">
   var b = 1;
</script>
<script type="text/javascript">
   var b = 1;
</script>

but in jsp (html 4.0.1) both Myfaces and Mojarra render this:

<script type="text/javascript">
   var b = 1;
</script>
<script type="text/javascript"><!--
   var b = 1;
//--></script>

There is an issue open (MYFACES-1353 HtmlResponseWriterImpl - Prematurely 
Closes HTML Elements ) that suggest the current implementation needs a review. 

Trinidad has some ResponseWriter implementations in 
org.apache.myfaces.trinidadinternal.io package ( XhtmlResponseWriter and 
HtmlResponseWriter). I think it is necessary to check how this implementations 
works and enhance HtmlResponseWriterImpl. A lot of care must be taken to 
prevent introduce bugs in this stuff, so it will be necessary create many tests.

I think it will be necessary to create some myfaces web config params to deal 
with <!-- and //--> inside <script> tags. 

> PartialResponse bogus response on render all because of falsely positioned 
> development stage script tag
> -------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2779
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2779
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.2-SNAPSHOT
>            Reporter: Werner Punz
>
> Hello Everyone some changes in the latest codebase cause a bogus render all 
> response:
> Here is the output I am getting:
> http://www.pastebin.org/368077
> as you can see the development stage is rendered before the html definition, 
> any proper html parsing on such an output has to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to