mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 03:35:13 +00:00
allow unquoted width,height
This commit is contained in:
parent
427490ff35
commit
340f3fc139
1 changed files with 12 additions and 1 deletions
|
@ -839,7 +839,8 @@ function bb_imgoptions($match) {
|
|||
// alt text cannot contain ']'
|
||||
|
||||
// [img|zmg=wwwxhhh float=left|right alt=alt text]url[/img|zmg]
|
||||
|
||||
// [img|zmg width="nnn" height="nnn" alt="xyz" style="float: abc;"]url[/img|zmg]
|
||||
|
||||
$local_match = null;
|
||||
$width = 0;
|
||||
$float = false;
|
||||
|
@ -859,6 +860,11 @@ function bb_imgoptions($match) {
|
|||
$alt = $matches[1];
|
||||
}
|
||||
|
||||
$x = preg_match("/width=([0-9]*)/ism", $attributes, $matches);
|
||||
if ($x) {
|
||||
$width = $matches[1];
|
||||
}
|
||||
|
||||
$x = preg_match("/width='(.*?)'/ism", $attributes, $matches);
|
||||
if ($x) {
|
||||
$width = $matches[1];
|
||||
|
@ -869,6 +875,11 @@ function bb_imgoptions($match) {
|
|||
$width = $matches[1];
|
||||
}
|
||||
|
||||
$x = preg_match("/height=([0-9]*)/ism", $attributes, $matches);
|
||||
if ($x) {
|
||||
$height = $matches[1];
|
||||
}
|
||||
|
||||
$x = preg_match("/height='(.*?)'/ism", $attributes, $matches);
|
||||
if ($x) {
|
||||
$height = $matches[1];
|
||||
|
|
Loading…
Reference in a new issue