Skip to content

[BUG] Illegal RegExp in Safari in 3.0.0-beta.1 and beta.2 #1314

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

Closed
sdabet-orpheo opened this issue Jun 13, 2023 · 14 comments
Closed

[BUG] Illegal RegExp in Safari in 3.0.0-beta.1 and beta.2 #1314

sdabet-orpheo opened this issue Jun 13, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@sdabet-orpheo
Copy link

Describe the bug:
Since I upgraded from 3.0.0-alpha6 to beta2, I have an issue on old Safari versions. The Html widget renders as a gray area and I see in the console the error:

FormatException: Illegal RegExp pattern (SyntaxError: Invalid regular expression: invalid group specifier name)
(?<=\n) *

HTML to reproduce the issue:
Any HTML content

Html widget configuration:
No specific configuration

Expected behavior:
HTML properly rendered, instead of gray area.

Screenshots:

Device details and Flutter/Dart/flutter_html versions:
iOS 12.5.5, flutter_html 3.0.0-beta.2

Stacktrace/Logcat

FormatException: Illegal RegExp pattern (SyntaxError: Invalid regular expression: invalid group specifier name)
(?<=\n) *

Additional info:

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

@sdabet-orpheo sdabet-orpheo added the bug Something isn't working label Jun 13, 2023
@bsubash2054
Copy link

bsubash2054 commented Jun 15, 2023

I am also experiencing this issue. This issue seems to arise because Safari doesn't support lookbehind assertion.

@Sub6Resources
Copy link
Owner

To clarify, is this happening on MacOS Safari, or just on iOS?

@sdabet-orpheo
Copy link
Author

@Sub6Resources I just experienced it on iOS

@bsubash2054
Copy link

@Sub6Resources Its occurring on MacOs too.

@aalloul
Copy link

aalloul commented Jun 27, 2023

I'm experiencing the same thing. It works great on Mac (Chrome and Safari), on android (chrome, firefox) but not on iOS Safari

@harismairaj
Copy link

I'm experiencing same issue on MAC (Safari).
image

@Toolenaar
Copy link

Same issue here any fixes or workarounds ?

@flutterdev06
Copy link

@Toolenaar use the package locally and comment out the code that is using the regex : (?<=\n)

@NicolasDionB
Copy link

I can confirm that simply commenting the faulting line in whitespace.dart fixes the issue. Cheers @flutterdev06!

@stefanhk31
Copy link

In case it helps other people: I have found this issue as well on ^3.0.0-alpha.3. I don't see it on the latest versions of iOS (17.4.x), but I spun up a simulator with iOS 16.2 and could see it there.

verygoodstefan added a commit to stefanhk31/flutter_html that referenced this issue Apr 27, 2024
kaierwen added a commit to kaierwen/flutter_html that referenced this issue May 14, 2024
SherpaMiguel added a commit to SherpaMiguel/flutter_html that referenced this issue May 25, 2024
@SherpaMiguel
Copy link

Could it please be solved to stop forking the plugin?

@stefanhk31
Copy link

@SherpaMiguel I don't think this package is being actively maintained anymore. I have since switched my app to a new package.

@SherpaMiguel
Copy link

@stefanhk31 i'm doing the same 😢

@Sub6Resources
Copy link
Owner

Fixed in #1444, should be released in 3.0.0 shortly.

@github-project-automation github-project-automation bot moved this from Todo to Done in flutter_html Mar 11, 2025
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: Done
Development

No branches or pull requests

10 participants