diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-06-19 17:26:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-06-19 17:26:27 +0000 |
commit | 828ba66500f49571f2007cacee25b18dce74336f (patch) | |
tree | 642334725a56aaffff5d6fe6dba264fa90071226 /includes/common.inc | |
parent | 0c5b324809dcb44de8690f7bba21fec607bd67d1 (diff) | |
download | brdo-828ba66500f49571f2007cacee25b18dce74336f.tar.gz brdo-828ba66500f49571f2007cacee25b18dce74336f.tar.bz2 |
- Bugfix: fixed utf-8 problem for people that use PHP 4.2.x or below. Patch #33 by Al.
- Bugfix: fixed translation problems in the user module and the block module. Patch by Stefan.
- Improvement: made it impossible to delete user role #1 and #2. Patch #38 by Al.
- Improvement: fixed the "Allowed HTML tag" issues. Makes for better code and improved usability. Patch #35 by Al.
NOTE: as soon the compose tips make their way into CVS, most of this code can be removed.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 14 |
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; |