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

Invalid Double 100% width <img> errer #118

Closed
thinkdai opened this issue Jul 7, 2019 · 11 comments
Closed

Invalid Double 100% width <img> errer #118

thinkdai opened this issue Jul 7, 2019 · 11 comments
Labels
bug Something isn't working high-priority
Milestone

Comments

@thinkdai
Copy link

thinkdai commented Jul 7, 2019

<img src="http://uploads/ueditor/2018-11-01/15410376945.jpg" alt="uploads/ueditor/2018-11-01/15410376945.jpg" width="100%" height="100%" border="0" vspace="0" style="width: 100%; height: 100%;"/>

flutter_html: ^0.10.4

@Sub6Resources
Copy link
Owner

Are you sure you are on 0.10.4? This issue was fixed in 0.10.2. If you are indeed having this issue on 0.10.4, please post the stacktrace of the issue so I can better debug what's happening.

@thinkdai
Copy link
Author

thinkdai commented Jul 9, 2019

I think you are fixed "<img width="100%">" this double, but you don't fixed "<img width="100%" style="width: 100%">" this, in style!

@Sub6Resources
Copy link
Owner

This plugin doesn't actually read the style attribute, so there's no way it could be causing the issue. If you could send a stacktrace of the issue that would be great.

@thinkdai
Copy link
Author

thinkdai commented Jul 11, 2019

flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following FormatException was thrown building HtmlRichTextParser(dirty, dependencies:
flutter: [_LocalizationsScope-[GlobalKey#8be53], Directionality, MediaQuery, DefaultTextStyle]):
flutter: Invalid double
flutter: 100%
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0      double.parse (dart:core-patch/double_patch.dart:110:28)
flutter: #1      HtmlRichTextParser._parseNode (package:flutter_html/rich_text_parser.dart:792:40)
flutter: #2      HtmlRichTextParser._parseNode.<anonymous closure> (package:flutter_html/rich_text_parser.dart:951:9)
flutter: #3      _ListBase&Object&ListMixin.forEach (dart:collection/list.dart:63:13)
flutter: #4      HtmlRichTextParser._parseNode (package:flutter_html/rich_text_parser.dart:950:18)
flutter: #5      HtmlRichTextParser._parseNode.<anonymous closure> (package:flutter_html/rich_text_parser.dart:951:9)
flutter: #6      _ListBase&Object&ListMixin.forEach (dart:collection/list.dart:63:13)
flutter: #7      HtmlRichTextParser._parseNode (package:flutter_html/rich_text_parser.dart:950:18)
flutter: #8      HtmlRichTextParser.build (package:flutter_html/rich_text_parser.dart:321:5)
flutter: #9      StatelessElement.build (package:flutter/src/widgets/framework.dart:3789:28)
flutter: #10     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3739:15)
flutter: #11     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #12     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3722:5)
flutter: #13     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3717:5)
flutter: #14     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
flutter: #15     Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
flutter: #16     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #17     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #18     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3722:5)
flutter: #19     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3717:5)
flutter: #20     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
flutter: #21     Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
flutter: #22     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #23     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #24     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3722:5)
flutter: #25     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3717:5)
flutter: #26     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
flutter: #27     Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
flutter: #28     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4876:14)
flutter: #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
flutter: #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
flutter: #31     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4876:14)
flutter: #32     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
flutter: #33     Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
flutter: #34     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #35     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #36     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3722:5)
flutter: #37     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3717:5)
flutter: #38     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
flutter: #39     Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
flutter: #40     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #41     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #42     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3722:5)
flutter: #43     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3717:5)
flutter: #44     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
flutter: #45     Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
flutter: #46     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4876:14)
flutter: #47     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
flutter: #48     Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
flutter: #49     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #50     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #51     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #52     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #53     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #54     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #55     StatelessElement.update (package:flutter/src/widgets/framework.dart:3796:5)
flutter: #56     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #57     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #58     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #59     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4601:32)
flutter: #60     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4992:17)
flutter: #61     _ViewportElement.update (package:flutter/src/widgets/viewport.dart:192:11)
flutter: #62     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #63     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #64     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #65     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #66     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #67     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #68     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #69     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #70     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #71     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #72     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #73     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5)
flutter: #74     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #75     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #76     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #77     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #78     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #79     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
flutter: #80     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #81     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #82     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #83     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #84     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #85     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5)
flutter: #86     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #87     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #88     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #89     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
flutter: #90     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #91     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #92     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #93     StatelessElement.update (package:flutter/src/widgets/framework.dart:3796:5)
flutter: #94     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #95     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #96     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #97     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
flutter: #98     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #99     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #100    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #101    ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
flutter: #102    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #103    RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4601:32)
flutter: #104    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4992:17)
flutter: #105    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #106    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #107    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #108    StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5)
flutter: #109    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #110    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #111    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #112    ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
flutter: #113    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #114    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #115    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #116    StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5)
flutter: #117    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #118    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #119    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #120    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #121    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #122    StatelessElement.update (package:flutter/src/widgets/framework.dart:3796:5)
flutter: #123    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #124    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14)
flutter: #125    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #126    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #127    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #128    StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5)
flutter: #129    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #130    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #131    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #132    StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5)
flutter: #133    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #134    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #135    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #136    ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
flutter: #137    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)
flutter: #138    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
flutter: #139    Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
flutter: #140    ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
flutter: #141    Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15)

@Andy1984
Copy link

The problem does not exist in 0.9.6, but it exists in 0.10.2 and 0.10.4. Hope this information helps you debug.

@Sub6Resources Sub6Resources added bug Something isn't working richtext-parser labels Jul 17, 2019
@a451492549
Copy link

I also encountered this problem in version 0.10.4, and version 0.9.6 is ok

@luofeng0603
Copy link

I have the same issue. My version is 0.10.4

@Guillaume-Fortin
Copy link

same issue but with width="10px"

@JingyuZhao
Copy link

I also encountered this problem in version 0.10.4, and version 0.9.6 is ok
确实,退回去就好了

@LqTk
Copy link

LqTk commented Sep 6, 2019

the same bug in 0.10.4

@Sub6Resources Sub6Resources added this to the 0.11.0 milestone Sep 6, 2019
@Sub6Resources
Copy link
Owner

This is fixed and the changes will be published alongside other changes in 0.11.0, which will be released by the end of this month.


If you don't want to wait for the pub release, you can add the following dependency to your .pubspec.yaml file to get the changes early (keep in mind that in doing so, you are using an unstable version of flutter_html which may potentially have other unreported issues):

dependencies:
  flutter_html:
    git:
      url: git://github.com/Sub6Resources/flutter_html.git
      ref: 0.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
None yet
Development

No branches or pull requests

8 participants