Commit 0f34a8ac authored by Michael Danielczok's avatar Michael Danielczok

fix: Allow ":" and "/" characters in content brick too.

#111
parent c34c0e9c
......@@ -244,18 +244,38 @@ class Brick extends QUI\QDOM
'brick-'.$this->id
);
//check if is json
if (is_string($this->cssClasses)){
$jsonArray = json_decode($this->cssClasses);
if (is_array($jsonArray)) {
$this->cssClasses = $jsonArray;
}
}
foreach ($this->cssClasses as $cssClass) {
$_classes[] = $cssClass;
}
if ($this->getAttribute('classes')) {
$classes = explode(' ', $this->getAttribute('classes'));
foreach ($classes as $class) {
$class = trim($class);
$oldCssClasses = $this->getAttribute('classes');
$_classes[] = $class;
}
$oldCssClassesJson = json_decode($oldCssClasses, true);
if (is_array($oldCssClassesJson)){
$oldCssClasses = $oldCssClassesJson;
}
$classes = $oldCssClasses ;
if (is_string($oldCssClasses)) {
$classes = explode(' ', $oldCssClasses);
}
foreach ($classes as $class) {
$class = trim($class);
$_classes[] = $class;
}
$_classes = array_unique($_classes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment