I think I've found a bug in the skin parser. I'm using the new <object> tags method of including controls. In particular, I'm trying to include a search field with an image as the submit button. If I use the following code in my skin:
<object id="dnnSEARCH" codetype="dotnetnuke/server" codebase="SEARCH">
<param name="ShowWeb" value="False" />
<param name="ShowSite" value="False" />
<param name="Submit" value="<img src="img/search.png" alt="Search" class="SearchButton" />" />
</object>
then I get the following HTML fragment on the rendered page
<input name="dnn$dnnSEARCH$txtSearch" type="text" maxlength="255" size="20" id="dnn_dnnSEARCH_txtSearch" class="NormalTextBox" onkeydown="return __dnn_KeyDown('13', ' __doPostBack(%27dnn$dnnSEARCH$cmdSearch%27,%27%27)', event);" />
<a id="dnn_dnnSEARCH_cmdSearch" class="SkinObject" href=" __doPostBack('dnn$dnnSEARCH$cmdSearch','')"><img src="/Portals/_default/Skins/SPL/img/search.png" alt="Search" class="SearchButton" </a>
Note that there is no closing ">" on the img tag!
I'm trying to write a valid xhtml skin, so I'd used an xhtml-style img tag as the param value. If instead I use a HTML4-style img tag with the following in the skin:
<object id="dnnSEARCH" codetype="dotnetnuke/server" codebase="SEARCH">
<param name="ShowWeb" value="False" />
<param name="ShowSite" value="False" />
<param name="Submit" value="<img src="img/search.png" alt="Search" class="SearchButton">" />
</object>
Then I get the following HTML on the rendered page
<input name="dnn$dnnSEARCH$txtSearch" type="text" maxlength="255" size="20" id="dnn_dnnSEARCH_txtSearch" class="NormalTextBox" onkeydown="return __dnn_KeyDown('13', ' __doPostBack(%27dnn$dnnSEARCH$cmdSearch%27,%27%27)', event);" />
<a id="dnn_dnnSEARCH_cmdSearch" class="SkinObject" href=" __doPostBack('dnn$dnnSEARCH$cmdSearch','')"><img src="/Portals/_default/Skins/SPL/img/search.png" alt="Search" class="SearchButton"></a>
</span>
That is to say, perfectly correct, includes the closing ">" on the img tag.
I think it should be possible to write valid XHTML skins including such images - I'd also have thought that the skin parser should simply take the param value as given in any case. Whatever, I reckon it as a bug.
This took me quite a while to find. I develop in Firefox, which had coped with the badly formed tag so well that I never realised there was a problem. Chrome, IE7 and IE8 in compatibility mode also coped fine but in IE8 in IE8 mode I had a really weird layout problem (much lower down the page) and it was quite some time before I discovered it was this badly-formed image tag at the top.
has anyone else encountered this or similar problems? And do I need to file a bug rapport somewhere else or will this posting suffice? (I'm using DNN 05.04.04 (2) Community Edition)