Remove span tags from core
[squirrelmail.git] / functions / html.php
index 3172bc5044d4c7fd855e0def212b323d61fea25e..ecdafd2eac790a65d1ca20ed9d76ec8689358a0e 100644 (file)
@@ -112,8 +112,36 @@ function create_image($src, $alt='', $width='', $height='',
 }
 
 
+/**
+ * Generates a span tag
+ *
+ * @param string $value   The contents that belong inside the span
+ * @param string $class   The CSS class name (OPTIONAL; default
+ *                        not used)
+ * @param string $id      The ID name (OPTIONAL; default not used)
+ *
+ * @return string The desired span tag.
+ *
+ * @since 1.5.2
+ *
+ */
+function create_span($value, $class='', $id='') {
+
+    global $oTemplate;
+
+    $oTemplate->assign('value', $value);
+    $oTemplate->assign('class', $class);
+    $oTemplate->assign('id', $id);
+
+    return $oTemplate->fetch('span.tpl');
+
+}
+
+
 /**
  * Generates html tags
+//FIXME: this should not be used anywhere in the core, or we should
+//       convert this to use templates.  We sould not be assuming HTML output.
  *
  * @param string $tag Tag to output
  * @param string $val Value between tags