Apr 18, 2007 at 03:39 AM

DevTip: Preserving HTML Descriptions 

With the introduction of the Universal Installer in Mambo 4.6.x, changes need to be made to the HTML coding of descriptions for extensions. Many developers include useful descriptions of the features or use of their extension.

The correct way to include HTML coded data within the description of an extension is by using CDATA blocks. This preserves the formatting of the description. An example of a correct CDATA block can be seen in the MOStlyCE editor addon:

Code:
<description><![CDATA[<p>MOStlyContent Editor - a wysiwyg editor for Mambo, based on Moxiecode\’s TinyMCE! and mosCE.</p><p>Features:</p><p>All the features of TinyMCE by Moxiecode and mosCE 1.0.3 Final. Now with a recent version of TinyMCE, Advanced and Simple themes, editor compression, dynamic plugin loading, plus more.</p><p>History: Ryan Demmer has moved on and is no longer developing the mosCE editor. Since futher development is not planned for mosCE I decided to create MOStlyCE based on mosCE and continue development.</p>]]></description>

So, from 4.6.x on, all extensions will need to include their HTML-coded descriptions within CDATA tags in order for the formatting to be preserved. The tags to use to enclose your HTML description are:

Code:
<![CDATA[ some data... ]]>

This change was made to provide "future-proofing" as Mambo moves towards enabling users to deliver sites as valid XHTML. Note, the Universal Installer does not strip the text contained within your HTML tags, but all HTML formatting is lost unless you use CDATA.

<Previous   Next>

The Mambo Foundation is a volunteer non-profit organization and relies entirely upon the financial and human resource donations of the wider Mambo open source community to keep Mambo going.

We need your support!
Please make a donation today.