- Implemented CSRF check, some bugfixes also included
This commit is contained in:
1 parent
362184f81f
commit
97f1f67af1
7 files changed
+72
-31
No files matched your search
@@ -177,8 +177,10 @@ class UiElement implements \ArrayAccess, \Iterator, \JsonSerializable {
|
||||
}
|
||||
}
|
||||
else if ( !is_numeric($key) ) {
|
||||
# will output something like <tag $key=$value></tag>
|
||||
$attributesList[] = strpos($value, '"') !== false ? "$key='$value'" : "$key=\"$value\"";
|
||||
$value = htmlspecialchars($value);
|
||||
|
||||
# will output something like <tag $key="$value"></tag>
|
||||
$attributesList[] = "$key=\"$value\"";
|
||||
}
|
||||
else {
|
||||
# will output something like <tag $value></tag>
|
||||
@@ -231,7 +233,7 @@ class UiElement implements \ArrayAccess, \Iterator, \JsonSerializable {
|
||||
public function html($set = null) {
|
||||
if ($set !== null) {
|
||||
$this->content = $set;
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -285,8 +287,18 @@ class UiElement implements \ArrayAccess, \Iterator, \JsonSerializable {
|
||||
break;
|
||||
|
||||
case 'style' :
|
||||
foreach($value as $var => $val) {
|
||||
$this->css($var, $val);
|
||||
if ( is_string($value) )
|
||||
{
|
||||
foreach(array_filter(explode(";", $value)) as $vars) {
|
||||
list($key, $value) = explode(':', $vars);
|
||||
|
||||
$this->css($key, $value);
|
||||
}
|
||||
}
|
||||
elseif ( is_array($value) ) {
|
||||
foreach($value as $var => $val) {
|
||||
$this->css($var, $val);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in new issue
Block a user