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

type 'Null' is not a subtype of type 'LiteralTerm' in type cast #1287

Open
javier-gantri opened this issue Jul 1, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@javier-gantri
Copy link

javier-gantri commented Jul 1, 2024

Steps to Reproduce

HTML
Some invalid CSS like <div  style="background: red; #;">, for context, I'm trying to parse some emails sent using external tools that sometimes generate some invalid CSS selector.
`HtmlWidget` configuration
HtmlWidget(
        content,
        buildAsync: true,
        onErrorBuilder: (context, element, error) {
          return const Text('Error parsing the message!');
        },
      ),
Tesing environment

Expected results

don't show the red x icon, and discard invalid HTML and CSS.

Actual results

show a red x icon

@javier-gantri javier-gantri added the bug Something isn't working label Jul 1, 2024
@daohoangson daohoangson self-assigned this Jul 3, 2024
@daohoangson
Copy link
Owner

I can't reproduce this bug with the provided HTML. Can you provide the full HTML that is triggering this bug? Also, an error stack would be useful.

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
None yet
Development

No branches or pull requests

2 participants