开发者

DNN MobiNuke Module Empty Div Tag Issue

开发者 https://www.devze.com 2023-03-01 22:42 出处:网络
I am using the DNN MobiNuke Module (v02.00.03) from DataQuadrant to create a mobile version of a website I have created. Everything is going well EXCEPT a weird issue I am running into with the Mobile

I am using the DNN MobiNuke Module (v02.00.03) from DataQuadrant to create a mobile version of a website I have created. Everything is going well EXCEPT a weird issue I am running into with the Mobile Skins. I have a simple Mobile Skin that looks like this:

<div id="mobile_frame">
  <div id="mobile_header">
      ...
      ...
  </div>
  <div id="main_wrap">
    <div id="mobile_main" class="sub">
      <div id="ContentPane" runat="server"></div>
    </div>
  </div>
  <div id="mobile_footer">
    ...
    ...
  </div>
</div>

The issue that is arising is that ANY content in the ContentPane that has an empty div tag will change itself when rendered in a mobile browser:

<div class="xxxx"></div>

Will change itself to

<div class="xxxx" />

The biggest problem that this is causing is that the browser is interpreting the tag as an opening div tag with no closing tag. Therefore it is placing an ending div tag essentially wherever it wants. It's causing ALL of the markup after this area to get very messed up.

Here is an example of the code as it should be, and how it is rendering on the page:

Should be:

  <div id="main_wrap">
    <div id="mobile_main" class="sub">
      ... Content Here ...
    </div>
  </div>
  <div id="mobile_footer">
  开发者_如何学JAVA  ...
  </div>
</div>

But it renders as:

  <div id="main_wrap">
    <div id="mobile_main" class="sub">
      ... Content Here ...
    </div>
    <div id="mobile_footer">
      ...
    </div>
  </div>
</div>

I can fix this in the markup that I have control of by putting   inside of the tags, but I do not have the time/energy to go through EVERY module that might be showing up in the ContentPane to check for empty tags. In addition, there are places where I want an empty tag to fill it with content later with javascript.

Lastly, I did a TON of research to look this up and I cannot find a thing. The closest that I found is that this happens in XSLT when transforming some XML, but as far as I know MobiNuke is not doing that.

Any help is greatly appreciated. Thanks!


I have figured out the issue after having a discussion with the vendor. There is a setting in the module settings called "Enable content adaptation". Apparently the setting will try to make the HTML to be XHTML compliant, but it was definitely not working for me. Hope this helps anyone else seeing this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号