On Tue, Mar 6, 2012 at 6:59 AM, Christopher Schultz
> On 3/6/12 9:46 AM, Nathan Bubna wrote:
>> Not to pick at semantics, but the xhtml feature came after the
>> ValidatorTool, so i'd call it an oversight that the ValidatorTool was
>> not changed to respect it.
> Okay, not a problem... I can fix it :)
> What do you think the best fix would be?
> It might be nice to (continue to) have CDATA optional. In that case, &&
> would need to be escaped (along with other stuff, of course). I think we
> only need to escape & < and >. Quotes and apostrophes aren't relevant,
> here, because everything is in a <script> tag so we won't have to worry
> about attributes, etc.
> The other option would be to make CDATA mandatory when in XHTML mode.
> That would probably break templates that have already been written to
> handle this situation. I think the above is a better idea.
> So, I can add logic something like this:
> if(xhtml & !cdata)
> js = escape(js);
> I think that will solve the problem without stepping on anyone's toes.
> Any comments?