Setting tag plewww-5.2-4
[plewww.git] / plekit / php / linetabs.php
index 57af891..d2be029 100644 (file)
@@ -46,6 +46,8 @@ drupal_set_html_head('
 // (*) you need to tune the image size, which is wrong, as the image should rather be bottom-aligned 
 
 function plekit_linetabs ($tabs, $id=NULL) {
+  // do not output anything if $tabs has no entry (unpleasant rendering)
+  if (empty ($tabs)) return;
   $active_line_tab=$_GET['active_line_tab'];
   // need id to pass to the onclick function attached to the input buttons
   $id="linetabs";
@@ -93,10 +95,10 @@ function plekit_linetabs ($tabs, $id=NULL) {
     } else {
       $type="type='button' value='$label'";
     }
-    $bubble=$todo['bubble'];
+    $bubble=htmlspecialchars($todo['bubble'], ENT_QUOTES);
     print "<span title='$bubble'>";
     $message="";
-    if ($todo['confirm']) $message=$todo['confirm'] . " ?";
+    if ($todo['confirm']) $message=htmlspecialchars($todo['confirm'], ENT_QUOTES) . " ?";
     print "<input $tracer $type onclick='linetabs_namespace.submit(\"$id\",\"$message\")' />";
     print "</span>";
     print "</fieldset></form></li>\n";