Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Article editor bug - mangled CDATA and comments

AFAICS the article editor should leave this strictly alone :

<script type="text/javascript">
//<![CDATA[
//<!--
function cofeprayerhint {
return overlib('Provided by the official <a href=http://www.cofe.anglican.org/services/ target=_blank>Church of England web site</a><br /><font size=1>© The Archbishops Council of the Church of England, 2002-2003</font>',CAPTION,'Daily Prayer',CAPTIONSIZE,12,CAPCOLOR,'#000',STICKY,TIMEOUT,'4000'); }
//-->
//]]>
</script>

because it is told to not once but twice, by the CDATA marked section and the HTML comment.

Nevertheless, it ignores this and rewrites it to :

<script type="text/javascript">
//<![CDATA[
//<!--
function cofeprayerhint {
return overlib('Provided by the official <a href=http://www.cofe.anglican.org/services/ target=_blank>Church of England web site<\/a><cd:preserve whitespace="" /><br /><cd:preserve whitespace="" /><font size=1>© The Archbishops Council of the Church of England, 2002-2003<\/font>',CAPTION,'Daily Prayer',CAPTIONSIZE,12,CAPCOLOR,'#000',STICKY,TIMEOUT,'4000'); }<cd:preserve whitespace="CL" /> //-->
//]]>
</script>

I think this is a bug, isn't it? Surely the parser should just look for the terminator and not touch anything until that : 'A CDATA marked section supresses markup recognition until "]]>".' (Steven deRose, the SGML FAQ Book, p38). Or am I way out in left field here?

Michael Wild
Friday, September 19, 2003

*  Recent Topics

*  Fog Creek Home