Skip to content

Commit

Permalink
Make sure that HTML attribute values with double-quotes are still wor…
Browse files Browse the repository at this point in the history
…king #77
  • Loading branch information
jissereitsma committed May 22, 2024
1 parent a0d96d6 commit 7a132a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Block/Picture.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,12 @@ public function getOriginalAttributes(): array
continue;
}

$attributes[] = $name.'="'.$value.'"';
if (strstr('"', $value)) {
$attributes[] = $name.'=\''.$value.'\'';
} else {
$attributes[] = $name.'="'.$value.'"';
}

}

if (preg_match_all('/@([^=]+)=\"([^\"]+)\"/', $this->getOriginalTag(), $matches)) {
Expand Down

0 comments on commit 7a132a1

Please sign in to comment.