|
@@ 952-961 (lines=10) @@
|
| 949 |
|
} |
| 950 |
|
|
| 951 |
|
// If there is a width in the style attributes: |
| 952 |
|
if (isset($attributes['width']) && $width == -1) { |
| 953 |
|
// check that the last two characters are px (pixels) |
| 954 |
|
if (strtolower(substr($attributes['width'], -2)) == 'px') { |
| 955 |
|
$proposed_width = substr($attributes['width'], 0, -2); |
| 956 |
|
// Now make sure that it's an integer and not something stupid. |
| 957 |
|
if (filter_var($proposed_width, FILTER_VALIDATE_INT)) { |
| 958 |
|
$width = $proposed_width; |
| 959 |
|
} |
| 960 |
|
} |
| 961 |
|
} |
| 962 |
|
|
| 963 |
|
// If there is a width in the style attributes: |
| 964 |
|
if (isset($attributes['height']) && $height == -1) { |
|
@@ 964-973 (lines=10) @@
|
| 961 |
|
} |
| 962 |
|
|
| 963 |
|
// If there is a width in the style attributes: |
| 964 |
|
if (isset($attributes['height']) && $height == -1) { |
| 965 |
|
// check that the last two characters are px (pixels) |
| 966 |
|
if (strtolower(substr($attributes['height'], -2)) == 'px') { |
| 967 |
|
$proposed_height = substr($attributes['height'], 0, -2); |
| 968 |
|
// Now make sure that it's an integer and not something stupid. |
| 969 |
|
if (filter_var($proposed_height, FILTER_VALIDATE_INT)) { |
| 970 |
|
$height = $proposed_height; |
| 971 |
|
} |
| 972 |
|
} |
| 973 |
|
} |
| 974 |
|
} |
| 975 |
|
|
| 976 |
|
// Future enhancement: |