1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge remote-tracking branch 'exreaction/ticket/12202' into develop-olympus

* exreaction/ticket/12202:
  [ticket/12202] Use an array in the data provider instead of exploding manually
  [ticket/12202] Can't call htmlspecialchars before checking for quotes
  [ticket/12202] Fix tests
  [ticket/12202] Test for parse_cfg_file
  [ticket/12202] Use copyright symbol in style.cfg files
  [ticket/12202] Apply htmlspecialchars to style.cfg data
This commit is contained in:
Joas Schilling
2014-03-14 13:53:55 +01:00
4 changed files with 112 additions and 5 deletions

View File

@@ -3367,7 +3367,7 @@ function parse_cfg_file($filename, $lines = false)
}
// Determine first occurrence, since in values the equal sign is allowed
$key = strtolower(trim(substr($line, 0, $delim_pos)));
$key = htmlspecialchars(strtolower(trim(substr($line, 0, $delim_pos))));
$value = trim(substr($line, $delim_pos + 1));
if (in_array($value, array('off', 'false', '0')))
@@ -3384,7 +3384,11 @@ function parse_cfg_file($filename, $lines = false)
}
else if (($value[0] == "'" && $value[sizeof($value) - 1] == "'") || ($value[0] == '"' && $value[sizeof($value) - 1] == '"'))
{
$value = substr($value, 1, sizeof($value)-2);
$value = htmlspecialchars(substr($value, 1, sizeof($value)-2));
}
else
{
$value = htmlspecialchars($value);
}
$parsed_items[$key] = $value;

View File

@@ -18,5 +18,5 @@
# General Information about this style
name = prosilver
copyright = © phpBB Group, 2007
version = 3.0.12
copyright = © phpBB Group, 2007
version = 3.0.12

View File

@@ -18,5 +18,5 @@
# General Information about this style
name = subsilver2
copyright = © 2005 phpBB Group
copyright = © 2005 phpBB Group
version = 3.0.12