5 Replies Latest reply on Dec 13, 2007 11:54 AM by cmanderson

    HTML and CSS in Announcement after Upgrade from 1.2 to 1.8

      Hello,

       

      With Clearspace 1.2, we had an employee directory set up as an announcement that was handled by HTML and CSS.  It displayed great, was easy to modify, etc.

       

      After the upgrade to 1.8, the formatting is being destroyed.  Eg, looking at the source code of the announcement, the inline <style> tag is now having escape characters put in, and there are line breaks at the end of each line of the code.  Snippet below:

       

          <p>&lt;style&gt;<br />

      &lt;!--table {}<br />

      table{<br />

           margin-top:30px;<br />

      }<br />

      table *{<br />

           font-weight:normal !important;<br />

           font-size:12px !important;<br />

           color:#333 !important;<br />

           border:none !important;<br />

      }<br />

       

      What you see in the browser is basically the original code that was copied in to create the announcement, but not the format it should be displaying (i.e. a table with alternating row colors, etc).  Snippet below:

       

      <style>

      <!--table {}

      table{

      margin-top:30px;

      }

      table *{

      font-weight:normal !important;

      font-size:12px !important;

      color:#333 !important;

      border:none !important;

      }

       

      I've tried turning off the HTML filter, and it helps somewhat, but the formatting is still getting hosed somewhere along the line.

       

      Any help is greatly appreciated.

       

      Chris

        • Re: HTML and CSS in Announcement after Upgrade from 1.2 to 1.8

          Hey Chris,

           

          Announcements weren't intended to hold HTML and as such they are escaped which is causing your problem. After a short discussion with my colleagues we determined that the developers intended for HTML to be escaped.

           

          There is however a JIRA improvement filed for this feature if you'd like to track it. It can be found at http://www.jivesoftware.com/issues/browse/CS-2207

           

          ~Sean Moran

            • Re: HTML and CSS in Announcement after Upgrade from 1.2 to 1.8

              Hi Sean,

               

              Thanks for the prompt response.

               

              Can you tell me why we were able to do this in 1.2 and not now?  I don't think 1.8 downgraded any features that 1.2 had, so we're trying to figure out what changed.

               

              Also, if using embedded HTML and CSS is not an option within an announcement, what about a document?  What is the best way to go about this?

               

              Thanks,

               

              Chris

              • Re: HTML and CSS in Announcement after Upgrade from 1.2 to 1.8

                Hi Sean,

                 

                One more quick question.

                 

                I think if I can get the CSS for this document in this space without having to embed in in the HTML, I can do what I want to do.  I'm going to look through the forum posts for detail on this, but if you have a quick response, that'd be great, too.

                 

                Thank you,

                 

                Chris

                  • Re: HTML and CSS in Announcement after Upgrade from 1.2 to 1.8

                    Hey Chris,

                     

                    I think that some time after 1.2 the developers decided that announcements should be surrounded in <p> tags. As part of implementing that all HTML inside announcements would have to be escaped to ensure things ran as expected.

                     

                    As for CSS and HTML inside documents if you use the Plain Text viewer you can usually add the tags you want inside there. If at any time you're using a tag that doesn't work inside a document, be sure and check if the tag appears in the "Allowed HTML Tags" field for the space. The list of tags you currently have allowed can be found by going to the admin console, then "Spaces"->"Settings"->"Filters and Macros" and finally clicking the "Settings" for the HTML Filter.

                     

                    Let me know if you have any other questions.

                    ~Sean

                      • Re: HTML and CSS in Announcement after Upgrade from 1.2 to 1.8

                        Sean,

                         

                        I re-created this information in a document, and after updating the filters and macro settings to allow for the tags that comprised the CSS and HTML, it worked fine.

                         

                        While this works great, we really liked this functionality in an announcement, as it was one less mouse clic.  Perhaps trivial, but we really got used to it.

                         

                        Thanks for the information, and I look forward to seeing updates and improvements to the announcements area, specifically allowing HTML again.

                         

                        Chris