validator.w3.org fails if id attribute contains brackets
[squirrelmail.git] / functions / strings.php
index 00761057faedbcc11d19ff037a0ccb10d97425d1..5f99b3858ae5c01653d317c51e4d3ffe0c8de2ad 100644 (file)
@@ -825,7 +825,7 @@ function makeComposeLink($url, $text = null, $target='') {
     // if javascript is on, use onclick event to handle it
     if($javascript_on) {
         sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
-        $compuri = $base_uri.$url;
+        $compuri = SM_BASE_URI.$url;
         return "<a href=\"javascript:void(0)\" onclick=\"comp_in_new('$compuri','$compose_width','$compose_height')\">$text</a>";
     }
 
@@ -1280,4 +1280,13 @@ function sq_count8bit($string) {
     return $count;
 }
 
+/**
+ * Callback function to trim whitespace from a value, to be used in array_walk
+ * @param string $value value to trim
+ * @since 1.5.2 and 1.4.7
+ */
+function sq_trim_value ( &$value ) {
+    $value = trim($value);
+}
+
 ?>