Monday, September 14, 2009

Coldfusion 7 CFHTMLHEAD Bug

The following code renders differently in CF 7 vs CF 8. I know everyone is talking about ColdFusion 9 now, but we just ran into this issue on a CF 7.0.2 instance.

It appears that adding the "profile" attribute to the HEAD tag is causing anything added by the CFHTMLHEAD tag to be placed at the very top of the page output, not in the HEAD section of the page.

The code:

<html>
<head profile="http://gmpg.org/xfn/11">
<title>Testing CFHTMLHEAD</title>
</head>
<body></body>
</html>
<cfhtmlhead text="<script>runme() { }</script>">


The result in CF 7:

<script>runme() { }</script><html>
<head profile="http://gmpg.org/xfn/11">
<title>Testing CFHTMLHEAD</title>
</head>
<body>
</body>
</html>


The result in CF 8:

<html>
<head profile="http://gmpg.org/xfn/11">
<title>Testing CFHTMLHEAD</title>
<script>runme() { }</script></head>
<body>
</body>
</html>

0 comments: