Skip to content

fix(ios): convert img attributes to integer values#688

Merged
hejsztynx merged 1 commit into
@ksienkiewicz/fix-android-normalizer-number-parsingfrom
@ksienkiewicz/fix-ios-int-img-attributes
Jul 8, 2026
Merged

fix(ios): convert img attributes to integer values#688
hejsztynx merged 1 commit into
@ksienkiewicz/fix-android-normalizer-number-parsingfrom
@ksienkiewicz/fix-ios-int-img-attributes

Conversation

@hejsztynx

Copy link
Copy Markdown
Collaborator

Summary

Now the img attributes are converted to integer. It's truthful to official HTML5 specifications, where width and height should be integer values and the floating point in HTML could be destructive, which could produce a similar issue as in
#685

Screenshots

When adding an image via modal with height and width set to 30

Before:

image

After:

image

Compatibility

OS Implemented
iOS
Android
Web

Checklist

  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

@hejsztynx hejsztynx requested a review from szydlovsky July 8, 2026 15:51
@hejsztynx hejsztynx merged commit da0ea3a into @ksienkiewicz/fix-android-normalizer-number-parsing Jul 8, 2026
@hejsztynx hejsztynx deleted the @ksienkiewicz/fix-ios-int-img-attributes branch July 8, 2026 15:56
hejsztynx added a commit that referenced this pull request Jul 9, 2026
# Summary

HTML parser on Android explicitly tired to parse `<img>` dimension
attributes `height` and `width` as `Integer`, with no exception caught,
which caused the whole parser to bail. Web and iOS outputs HTML with
float dimensions, so using that HTML in Android would break the input.

Also I got rid of the core cause of this issue - made the iOS parser
function the same as the Android one and they both now converts both
dimension attributes to integer values. #688

## Testing

Example HTML that would  break if used in `Set input's value`

```html
<html>
<p>Asd<img src="asd" width="30.000000" height="30.000000"/></p>
</html>
```

## Screenshots / Videos

iOS on the left, Android on the right

Before:


https://github.com/user-attachments/assets/acf3b65a-62c0-4e95-b97d-945115341b1a

After:


https://github.com/user-attachments/assets/306bba36-42b0-45ac-af18-706839c90ea0


## Compatibility

| OS      | Implemented |
| ------- | :---------: |
| iOS     |    ❌     |
| Android |    ✅     |
| Web     |    ❌     |

## Checklist

- [ ] E2E tests are passing
- [ ] Required E2E tests have been added (if applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants