Bug #9474: Fix display of raw HTML in help system
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 4 Jan 2011 21:13:23 +0000 (14:13 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 4 Jan 2011 21:17:29 +0000 (14:17 -0700)
Use new raw XML tag to indicate child tags should not be parsed.

framework/Core/lib/Horde/Help.php
kronolith/locale/en/help.xml

index 9020a94..cc1b333 100644 (file)
@@ -83,10 +83,6 @@ class Horde_Help
             if ($entry->attributes()->id == $id) {
                 foreach ($entry->children() as $child) {
                     switch ($child->getName()) {
-                    case 'title':
-                        $out .= '<h1>' . $this->_processNode($child) . '</h1>';
-                        break;
-
                     case 'heading':
                         $out .= '<h2>' . $this->_processNode($child) . '</h2>';
                         break;
@@ -94,10 +90,16 @@ class Horde_Help
                     case 'para':
                         $out .= '<p>' . $this->_processNode($child) . '</p>';
                         break;
+
+                    case 'raw':
+                        $out .= '<p class="fixed">' . htmlentities($this->_processNode($child)) . '</p>';
+                        break;
+
+                    case 'title':
+                        $out .= '<h1>' . $this->_processNode($child) . '</h1>';
+                        break;
                     }
                 }
-
-                break;
             }
         }
 
@@ -218,5 +220,4 @@ class Horde_Help
             . Horde::img('help.png', Horde_Core_Translation::t("Help")) . '</a>';
     }
 
-
 }
index 85d6a7b..064ac72 100644 (file)
   <para>
     To embed a small Month View of the current month:
   </para>
-    <i>&lt;div id=&quot;kronocalendar&quot;&gt;&lt;/div&gt;&lt;script
-    src=&quot;http://hostname.example.com/horde/kronolith/imple.php?imple=Embed
-    /container=kronocalendar/view=month/calendar=calendar_name&quot;
-    type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</i>
+  <raw>
+    &lt;div id=&quot;kronocalendar&quot;&gt;&lt;/div&gt;&lt;script
+    src=&quot;http://hostname.example.com/horde/kronolith/imple.php?imple=Embed/container=kronocalendar/view=month/calendar=calendar_name&quot;
+    type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+  </raw>
   <para>
     To embed an Upcoming Events View (note the 'months' and 'maxevents'
     parameters):
   </para>
-    <i>&lt;div id=&quot;kronolist&quot;&gt;&lt;/div&gt;&lt;script
-    src=&quot;http://hostname.example.com/horde/kronolith/imple.php?imple=Embed
-    /view=monthlist/calendar=calendar_name/container=kronolist/months=2/
-    maxevents=10&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</i>
+  <raw>
+    &lt;div id=&quot;kronolist&quot;&gt;&lt;/div&gt;&lt;script
+    src=&quot;http://hostname.example.com/horde/kronolith/imple.php?imple=Embed/view=monthlist/calendar=calendar_name/container=kronolist/months=2/
+    maxevents=10&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+  </raw>
   <para>
     To embed a Summary View:
   </para>
-    <i>&lt;div id=&quot;kronosummary&quot;&gt;
+  <raw>
+    &lt;div id=&quot;kronosummary&quot;&gt;
     &lt;/div&gt;&lt;script type=&quot;text/javascript&quot;
-    src=&quot;http://hostname.example.com/horde/kronolith/imple.php?imple=Embed
-    /container=kronosummary/view=summary/calendar=calendar_name
-    &quot;&gt;&lt;/script&gt;</i>
+    src=&quot;http://hostname.example.com/horde/kronolith/imple.php?imple=Embed/container=kronosummary/view=summary/calendar=calendar_name
+    &quot;&gt;&lt;/script&gt;
+  </raw>
 </entry>
 </help>