Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.79k stars 860 forks source link

[BUG] Unordered list items are prefixed with unwanted symbol (Android only) #1190

Closed denesh-raymond closed 1 year ago

denesh-raymond commented 1 year ago

Describe the bug: Unordered list items are being prefixed with a strange symbol (4 horizontal stacked lines) on Android.

This occurs on Android only - reproducible on Pixel 6, Android 13. Looks fine on iPhone 11 Pro, iOS 15.2.

HTML to reproduce the issue: <ul> <li>Do you agree with the results?</li> <li>Why do you think this is your Love Style?</li> <li>Are these things important to you? Why?&nbsp;</li> <li>Why aren&rsquo;t the things that you score low on important to you?</li> </ul>

Html widget configuration:

Html(
    data: _controller.article.article,
    onLinkTap: (url, _, __, ___) => _launchUrl(url),
    style: {
        "p": Style(fontSize: FontSize(16), fontWeight: FontWeight.normal, letterSpacing: 0.15, fontFamily: 'Jakarta'),
        "li": Style(fontSize: FontSize(16), fontWeight: FontWeight.normal, letterSpacing: 0.15, fontFamily: 'Jakarta'),
    },
    customRender: {
        "user": (_, __) => Text(_controller.getUserDisplayName(), style: _getTextStyle()),
        "partner": (_, __) => Text(_controller.getPartnerDisplayName(), style: _getTextStyle()),
    },
    tagsList: Html.tags..addAll(["user", "partner"]),
)

Expected behavior: List items should look the same irrespective of device

Screenshots: Android iOS

Device details and Flutter/Dart/flutter_html versions:

Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7e9793dee1 (8 months ago) • 2022-03-02 11:23:12 -0600
Engine • revision bd539267b4
Tools • Dart 2.16.1 • DevTools 2.9.2
flutter_html: ^2.2.0
msyahidin-ta commented 1 year ago

any update on this?

erickok commented 1 year ago

Sounds like a regression. This was fixed in #921.

Sub6Resources commented 1 year ago

I'll check to see if #1161 has fixed this. If not, I'll look into it further

Sub6Resources commented 1 year ago

Not able to reproduce on 3.0.0-beta.1. Since 3.0.0-beta.1 removed the reliance on the \t character for list rendering, we can safely assume this issue was fixed.