Quick Nav:  Online Store   |   Login | Register

Span tag injected from DNN

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
gu_pim
<20 Posts
Posts:7


07/01/2007 8:23 PM  
Hi guys,

I have some problem with the website I'm currently working on which requires W3c compliant. One error that I can't figure out is the span tag. From the W3c validator, it's not allow span tag to contain any div or p tag. I try to use PageBlaster to strip it out let's say change from span to div. It seems easy, but I can't think of which Regex to be use with this situation. I tried this

((.|[\n\r])*?)

and it work on the EditPad Pro but when I used the same rule with PageBlaster. It's not work at all. Can any one help me to solve this problems

Thanks heap!!!
gu_pim
gu_pim
<20 Posts
Posts:7


07/01/2007 8:37 PM  
The tag is gone. Here is it.

< span\s+(id="dnn_ctr)(\d{3})([\w_\-"\s=]*)>((.|[\n\r])*?) < /span>

Thanks
John Mitchell
Posts:3084


07/01/2007 9:06 PM  
This looks like the span tag from the Html/Text module. The only way I found to get rid of it was to change the module.
In the newest version of the Html module you can also turn of the Edit-In-Place function which is what causes that tag.

It may also be the span tag from the "no container" container, which can be changed to a div.
gu_pim
<20 Posts
Posts:7


07/01/2007 11:41 PM  
Do you have any idea on how to write the regex to capture the span tag and change to div tag? Because on the page I test it contains many module for example Text/HTML, Media, RSS, and so on which I think produce the span tag as well. I don't want to change all the source of modules I use in the website or that is the only method to fix this problem.

Thanks again
gu_pim
John Mitchell
Posts:3084


07/01/2007 11:47 PM  
Sorry but no, I don't have a rule to remove a span wrapper from other modules. I tried but it was very difficult because of the way the content changes. Your's may be as ggod as any I did though. I can give it another shot with that.

gu_pim
<20 Posts
Posts:7


07/02/2007 12:48 AM  
So if changing the source code is the only way (easiest ?) to strip out the span tag, do you have any guess where these tags come from. I checked in the skin.vb in the DotNetNuke.Library.Components.Skins It seems right but not 100% sure.
John Mitchell
Posts:3084


07/02/2007 8:04 AM  
The only ones I found were in the Html/Text module and in the no container.ascx file. If you point me to your actual page I may be able to figure out where others are from.
gu_pim
<20 Posts
Posts:7


07/02/2007 10:16 PM  
Thanks John, I fix the no_container.ascx already and almost all span gone. But the remains which I think come from the HTML/TEXT module still there. I've look into the module but I can't find any trace of the span div. Is it the same module between Text/Html and Html/Text because of in my website it is Text/Html? (- -?) and also can you point me which file in the module I can fix?

Thanks a lot!!!!
gu_pim
John Mitchell
Posts:3084


07/02/2007 11:07 PM  
Yes, they are the same, I just had the name backwards.

It is the /DesktopModules/Html/HtmlModule.ascx file that I changed.

I think you can remove the validation error by changing the Edit-In-Place setting under Admin > Site Settings in the latest versions of DNN though.
gu_pim
<20 Posts
Posts:7


07/03/2007 12:50 AM  
Hi John,

Did you mean "Inline Editor Enabled" cuz I can't find the Edit-In-Place as you said or because I use the Text/Html version 03.03.00. I know it's old but the website we are working on now using this version.

Thanks.
John Mitchell
Posts:3084


07/03/2007 12:54 AM  
Yes, that is it. uncheck that box and see if it removes the span. Otherwise you will need to modify the Html module.
gu_pim
<20 Posts
Posts:7


07/03/2007 1:44 AM  
Hi me again. After I looked in the HtmlModule.ascx. I found just this

< %@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke.WebControls" %>
< %@ Control language="vb" Inherits="DotNetNuke.Modules.Html.HtmlModule" CodeBehind="HtmlModule.ascx.vb" AutoEventWireup="false" Explicit="True" %>
< dnn:dnnlabeledit mouseovercssclass="LabelEditOverClassML" enableviewstate="False" cssclass="Normal" runat="server" id="lblContent">
LabelEditCssClass="LabelEditTextClass" EditEnabled="False" MultiLine="True" RichTextEnabled="True">

I can't see any span tag in this file or even in the vb code. Plz help me where I have to fix. Thanks a lot.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > Span tag injected from DNN



ActiveForums 3.7
Powered by: Snapsis Software