|
@@ 400-411 (lines=12) @@
|
| 397 |
|
} |
| 398 |
|
|
| 399 |
|
// If there is a width in the style attributes: |
| 400 |
|
if ( |
| 401 |
|
($width == -1 && isset($attributes['width'])) |
| 402 |
|
&& |
| 403 |
|
// check that the last two characters are px (pixels) |
| 404 |
|
strtolower(substr($attributes['width'], -2)) == 'px' |
| 405 |
|
) { |
| 406 |
|
$proposed_width = substr($attributes['width'], 0, -2); |
| 407 |
|
// Now make sure that it's an integer and not something stupid. |
| 408 |
|
if (filter_var($proposed_width, FILTER_VALIDATE_INT)) { |
| 409 |
|
$width = $proposed_width; |
| 410 |
|
} |
| 411 |
|
} |
| 412 |
|
|
| 413 |
|
// If there is a width in the style attributes: |
| 414 |
|
if ( |
|
@@ 414-425 (lines=12) @@
|
| 411 |
|
} |
| 412 |
|
|
| 413 |
|
// If there is a width in the style attributes: |
| 414 |
|
if ( |
| 415 |
|
($height == -1 && isset($attributes['height'])) |
| 416 |
|
&& |
| 417 |
|
// check that the last two characters are px (pixels) |
| 418 |
|
strtolower(substr($attributes['height'], -2)) == 'px' |
| 419 |
|
) { |
| 420 |
|
$proposed_height = substr($attributes['height'], 0, -2); |
| 421 |
|
// Now make sure that it's an integer and not something stupid. |
| 422 |
|
if (filter_var($proposed_height, FILTER_VALIDATE_INT)) { |
| 423 |
|
$height = $proposed_height; |
| 424 |
|
} |
| 425 |
|
} |
| 426 |
|
|
| 427 |
|
} |
| 428 |
|
|