diff options
| author | Nils Adermann <naderman@naderman.de> | 2007-01-26 18:15:17 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2007-01-26 18:15:17 +0000 |
| commit | 5bb75c590d17401984dbfd68746eb6fe9d27a9f6 (patch) | |
| tree | 5b9ef84bf77ef27fb52cc84a2b422fdd626fb7c3 /phpBB/includes/acp | |
| parent | 4274eb2a075c72dc5b62bf09c1b737528834f54a (diff) | |
| download | forums-5bb75c590d17401984dbfd68746eb6fe9d27a9f6.tar forums-5bb75c590d17401984dbfd68746eb6fe9d27a9f6.tar.gz forums-5bb75c590d17401984dbfd68746eb6fe9d27a9f6.tar.bz2 forums-5bb75c590d17401984dbfd68746eb6fe9d27a9f6.tar.xz forums-5bb75c590d17401984dbfd68746eb6fe9d27a9f6.zip | |
- allow underscores in CSS class names / ids
- remove control characters from clean strings, and map all space characters to ASCII space (\x20)
git-svn-id: file:///svn/phpbb/trunk@6932 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp')
| -rw-r--r-- | phpBB/includes/acp/acp_styles.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index d2ce01863b..ec69944f5e 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -967,7 +967,7 @@ parse_css_file = {PARSE_CSS_FILE} // Pull out a list of classes $classes = array(); - if (preg_match_all('/^([a-z0-9\.,:#> \t]+?)[ \t\n]*?\{.*?\}/msi', $stylesheet, $matches)) + if (preg_match_all('/^([a-z0-9\.,:#_\->* \t]+?)[ \t\n]*?\{.*?\}/msi', $stylesheet, $matches)) { $classes = $matches[1]; } @@ -1266,14 +1266,14 @@ parse_css_file = {PARSE_CSS_FILE} else { // check whether the custom class name is valid - if (!preg_match('/^[a-z0-9#:.\- ]+$/i', $custom_class)) + if (!preg_match('/^[a-z0-9\.,:#_\->*]+$/i', $custom_class)) { trigger_error($user->lang['THEME_ERR_CLASS_CHARS'] . adm_back_link($this->u_action . "&action=edit&id=$theme_id&text_rows=$text_rows"), E_USER_WARNING); } else { // append an empty class definition to the stylesheet - $stylesheet .= "\n$custom_class\n{\n}"; + $stylesheet .= "\n$custom_class {\n\t\n}"; $message = $user->lang['THEME_CLASS_ADDED']; } } |
