Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Bug in skin parser: badly formed img tags when using objects and imgs for submit in searchBug in skin parser: badly formed img tags when using objects and imgs for submit in search
Previous
 
Next
New Post
7/22/2010 11:06 AM
 
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=&quot;img/search.png&quot; alt=&quot;Search&quot; class=&quot;SearchButton&quot; />" />
</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);" />&nbsp;
  <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=&quot;img/search.png&quot; alt=&quot;Search&quot; class=&quot;SearchButton&quot;>" />
</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);" />&nbsp;
  <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)

 
New Post
7/25/2010 4:38 PM
 
Seems like a bug, please log this on: support.dotnetnuke.com.

Thanks
 
New Post
7/25/2010 5:58 PM
 
This is already logged as a bug.  The issue is the closing /> which causes problems with the parser.  The workaround for now, as I have pointed out in Gemini, is to html encode the closing bracket so that it becomes /&gt; which is what we do in the MinimalExtropy skin

Joe Brinkman
DNN Corp.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Bug in skin parser: badly formed img tags when using objects and imgs for submit in searchBug in skin parser: badly formed img tags when using objects and imgs for submit in search


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out