summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 228e6d339..ec534759f 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -203,7 +203,15 @@ function variable_del($name) {
}
function drupal_specialchars($input, $quotes = ENT_NOQUOTES) {
- return htmlspecialchars($input, $quotes, "utf-8");
+
+ /*
+ ** Note that we'd like to go 'htmlspecialchars($input, $quotes, "utf-8")'
+ ** like the PHP manual tells us to, but we can't because there's a bug in
+ ** PHP <4.3 that makes it mess up multibyte charsets if we specify the
+ ** charset. Change this later once we make PHP 4.3 a requirement.
+ */
+
+ return htmlspecialchars($input, $quotes);
}
function table_cell($cell, $header = 0) {
@@ -877,6 +885,10 @@ function form_weight($title = NULL, $name = "weight", $value = 0, $delta = 10, $
return form_select($title, $name, $value, $weights, $description, $extra);
}
+function form_allowed_tags_text() {
+ return variable_get("allowed_html", "") ? (t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))) : "";
+}
+
function url($url = NULL, $query = NULL) {
global $base_url;