Script code blocks may be safely inserted into an editable region using CodeProtect. These script code blocks are represented in the editor interface by a red question mark icon. This icon is shown in the figure below:
Figure 1: CodeProtect icon
CodeProtect regions may be inserted or edited by clicking on the CodeProtect button in the editor toolbar, as shown in figure 2. This will open the CodeProtect editor window.
Figure 2: CodeProtect editor button
Whether creating a new CodeProtect region or editing a new one, code blocks are entered into the CodeProtect window, as shown in the following figure:
Figure 3: CodeProtect editor window
The purpose of CodeProtect is to allow users the ability to insert PHP, ASP, or JSP code into an editable region. ASP and JSP code must use the <% - %> processing instruction notation. PHP must use the <?php - ?> or <? - ?> notation.
If the page is a publish control file (PCF) or any other type of XML implementation, then only PHP code blocks are allowed. This is because the ASP and JSP <% - %> tagging is invalid XML. PHP blocks, on the other hand, are valid XML preprocessing instructions. XSL transformation of PHP code blocks is successful, but it will fail for ASP and JSP.