flutter_html icon indicating copy to clipboard operation
flutter_html copied to clipboard

[BUG] `&nbsp` (without semicolon) is treated as an entity.

Open mkucharski17 opened this issue 1 year ago • 1 comments

Describe the bug: &nbsp should be treated as normal text. I tried other entities without semicolon eg &larr or &rarr and they work properly.

HTML to reproduce the issue: <p>Let's &rarr; &larr; &nbsp; try this!</p><p>Let's &rarr &larr &nbsp try this!</p>

Html widget configuration:

         Html(
              data: "<p>Let's &rarr; &larr; &nbsp; try this!</p>"
                  "<p>Let's &rarr &larr &nbsp try this!</p>",
              style: {
                'p': Style(margin: Margins.all(0)),
              },
            ),

Expected behavior: &nbsp should be treated as normal text.

Screenshots: entities_example

Device details and Flutter/Dart/flutter_html versions:

Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (3 miesiące temu) • 2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3

mkucharski17 avatar Sep 06 '24 14:09 mkucharski17

Hmm definitely strange. I wonder if the html package we're using to parse the HTML is overcorrecting here. I'll look into this

Sub6Resources avatar Mar 12 '25 02:03 Sub6Resources