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

Werner Punz commented on MYFACES-2831:
--------------------------------------

Hi, first of all thanks for the patch, but I am still not entirely convinced 
whether we should patch this in. The reason is, that the entire mentality of 
the responsewriter is to give absolute control to the user over the rendering 
behavior.
The reason is, the responseWriter has to act platform and output format 
agnostic.
While nested CDATA blocks are not allowed for XML they might be for another 
format.

We only blocked that for the partial response writer because there the entire 
output format has been dedicated xml, so if we integrated such a thing we 
should definitely check if the outputformat is an xml dialect before taking the 
control from the users hands. In the end primefaces has to patch it out.

In any case, I will bring this issue to the jsf open list next week, for 
discussion (I am on vacation this week), my personal guess is that any xmlish 
dialect can do it, but everything else should not tamper around CDATA!
Or leave the user the absolut end control in this case. 


> Avoid neested CDATA section for PPR e.g. with Primefaces
> --------------------------------------------------------
>
>                 Key: MYFACES-2831
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2831
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.2-SNAPSHOT
>            Reporter: Marcus Büttner
>         Attachments: MYFACES-2831.patch
>
>
> In PPR with Primefaces a neested CDATA section is rendered for components 
> with script sections. I attached a patch for the HtmlResponseWriterImpl in 
> myfaces-shared which avoid the double rendering of the CDATA section.
> Primefaces uses startCDATA and endCDATA of ResponseWriter for it's cdata 
> section. I've overridden this two methods to memorise if a cdata section is 
> open. 
> If a cdata section is open it's not opened a second one. I added this check 
> to the writeScriptContent() method because there occurse the problem with 
> Primefaces.
> Please review the patch because I'm not sure if there are any site effects.
> Thanks,
> Regards Marcus

-- 
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