Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] List & other tag behavior different between String and Element #1397

Open
Skylled opened this issue Dec 11, 2023 · 0 comments
Open

[BUG] List & other tag behavior different between String and Element #1397

Skylled opened this issue Dec 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Skylled
Copy link

Skylled commented Dec 11, 2023

Describe the bug:

The same HTML code produces different results depending on whether I use Html.fromElement or Html.

There are quite a few discrepancies, but the most easily described is that <ol> tags no longer increment correctly. When using Html.fromElement, all list items are prepended with "0." Using the same HTML code (obtained via element.outerHtml) but with the Html() constructor, lists appear correctly.

HTML to reproduce the issue:

<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>

Expected behavior:
An ordered list should enumerate correctly regardless of whether the HTML was pre-parsed.

Screenshots:

Screenshot 2023-12-11 10 36 15 AM
Screenshot 2023-12-11 10 35 24 AM

Device details and Flutter/Dart/flutter_html versions:

Flutter 3.16.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b0366e0a3f (6 days ago) • 2023-12-05 19:46:39 -0800
Engine • revision 54a7145303
Tools • Dart 3.2.3 • DevTools 2.28.4

flutter_html version: 3.0.0-beta2
Device: iOS Simulator & iPad Pro

A picture of a cute animal (not mandatory but encouraged)

toffee-xmas-tree

@Skylled Skylled added the bug Something isn't working label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant