+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Sitefinity doesn't like arbitrary html elements

Sitefinity doesn't like arbitrary html elements

9 posts, 0 answered
  1. vibrantice
    vibrantice avatar
    4 posts
    Registered:
    01 Oct 2012
    18 Oct 2012
    Link to this post
    I tried adding a <section> tag (and other tags) in a content editor, and Sitefinity rearranges the content horribly:

    input:
    <section>
    <h1>Hello</h1>
    </section>

    output:
    <section />
    <h1>Hello</h1>
  2. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    19 Oct 2012 in reply to vibrantice
    Link to this post
    Hey Vibrantice,

    Sitefinity's Editor is an xhtml editor - meaning it'll try and strip out any non xhtml valid tags, so its not necessarily a Sitefinity bug, but more a RadEditor filter issue.

    (check this thread: http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-partially-strips-out-html5-microdata.aspx )

    There is a Administration setting to set content filters from 'DefaultFilters' to something else BUT due to a Bug in Sitefinity that's not being applied. (Bug's not fixed in v5.2 as far as I'm aware)

    So basically, unless you want to go out and try a code route to overcome the bug (and thus break upgrade ability) you're not going to get that working. If you'd like the code snippets, just sent me an email or hit me up on Twitter: jbokkers so I'll forward the solution to you.

    Jochem
  3. vibrantice
    vibrantice avatar
    4 posts
    Registered:
    01 Oct 2012
    19 Oct 2012 in reply to Jochem Bökkers
    Link to this post
    Thank you for the reply.  I really don't want to muck with the code base.  I think converting those tags to divs with classes will be the easiest short-term solution until the bug is fixed.   Is a bug fix planned any time soon?
  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    20 Oct 2012 in reply to vibrantice
    Link to this post
    I've had it reported for at least a couple releases...nobody REALLY knows what bugs will get fixed when, but 5.3 will be no major features, just bug fixes and enhancements
  5. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    21 Oct 2012 in reply to vibrantice
    Link to this post
    Hey Vibrantice,

    Most likely not in v5.3 yet entirely. Sitefinity 'under water' uses sort of different kind of editors - one for templates and one for pages. Hence also the reason why we haven't got shared content in templates no more.

    So while hopefully the ContentFilter bug will be fixed for 5.3, it will only be applicable to the 'page' editor and not the 'template' editor.

    Jochem
  6. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    23 Oct 2012 in reply to Jochem Bökkers
    Link to this post
    I can't remember exactly what the problem was but I ran into an issue with RadEditor stripping stuff out so I entered it into the HTML view then hit publish. (As opposed to entering it in HTML them clicking back to design to verify it was correct...)

    It seems, to me, that some of the "cleaner" code is only run when you toggle back to Design view.
  7. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    24 Oct 2012 in reply to Tim
    Link to this post
    Hey Tim,

    You're right on a page content block, editing html without switching back to design works (thank god for bugs sometimes ;) but that unfortunately doesn't work on a template level...

    Jochem
  8. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    24 Oct 2012
    Link to this post
    There also seems to be code in the contentblock designer.js (btw) to client-side toggle between the modes to kick-off the filters

    Happens in applyChanges, so going back in (in theory, haven't tested) would wipe them out.
  9. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    25 Oct 2012 in reply to Steve
    Link to this post
    @Steve,

    It does in reality.
    Only pasting directly into the HTML tab and hitting save works kinda for page-level content blocks. Anything else (re-editing, switching tabs, standing-on-your-head) will affect the pasted mark-up.

    That in itself is also a bug, but lets get the contentfilter apply bug fixed first :)
9 posts, 0 answered