DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Editor removes classes

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





New Around Here





    Hi,

    I'm having a strange behavior on DNN 9.04.01.

    I copy and paste my HTML code (very simple code) but after saving, all css classes are removed.

    For example:

    ul class="bxslider"....

    becomes 

    ul ....

    without my class.

    So it looses every behavior assigned to the class (in this case images slider).

    What I've to do?

    Thanks






    Veteran Member





      Tjep's digital agencyRegards,
      Tycho de Waard

      Tjep's digital agency
      We just love DNN
      https://www.tjeps.com





      Veteran Member





        Posted By Davide Martini on 08 Jul 2020 08:10 AM

        Hi,

        I'm having a strange behavior on DNN 9.04.01.

        I copy and paste my HTML code (very simple code) but after saving, all css classes are removed.

        For example:

        ul class="bxslider"....

        becomes 

        ul ....

        without my class.

        So it looses every behavior assigned to the class (in this case images slider).

        What I've to do?

        Thanks

        That's the default behaviour of the CKEditor (the component used as the editor).
        It's for security reasons.
        Read more about it here: https://dnncommunity.org/...-is-cleaning-my-HTML

        BTW, I would advise you to upgrade DNN to the latest version (also for security reasons).
        Also as have a look at the structured content modules for DNN like Open Content or 2SXC.
        Managing a slider inside the Editor is very cumbersome compared to those modules

         

         






        New Around Here





          Thank you,

          by inserting the string value *(*);*{*} in extraAllowedContent I can save my classes.

          Have a nice day!






          New Around Here





            For me, this does not work anymore. It only works for me if you use *(*)*{*} without the semi-colon inbetween.

            Also note to anyone that might reference this thread, clear cache via server persona bar admin settings if you don't see it working after save.






            New Around Here





              Oh wow, this saves me from loosing hair because of head scratching. I immediately noticed this behavior in my HTML module while editing a simple bootstrap column and adding a class on it.

              So, I started crawling for answers and viola.

              Thanks





              Veteran Member





                Indeed... Any HTML that is complex in nature or has any risk of people (and web-based editing tools) breaking the HTML should instead use a structured content module instead of the HTML module.  As Timo has suggested, the two most popular options currently are OpenContent and 2sxc.






                New Around Here





                  How does this "fix" the issue for pages and modules already added?






                  New Around Here





                    Posted By Tycho de Waard (SU) on 7/8/2020 7:26 AM
                    Here is a blog by Timo: https://dnncommunity.org/...-is-cleaning-my-HTML

                    How does this "fix" the issue for pages and modules that have already been added?

                     

                     






                    Veteran Member





                      If you already edited the content on some pages and part of the content has been stripped and this is in the HTML module, you can use the versioning of the module. For any other module, I think the only solution is your backup.

                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

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

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. 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.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved