[BUG] Illegal RegExp in Safari in 3.0.0-beta.1 and beta.2
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)
I am also experiencing this issue. This issue seems to arise because Safari doesn't support lookbehind assertion.
To clarify, is this happening on MacOS Safari, or just on iOS?
@Sub6Resources I just experienced it on iOS
@Sub6Resources Its occurring on MacOs too.
I'm experiencing the same thing. It works great on Mac (Chrome and Safari), on android (chrome, firefox) but not on iOS Safari
I'm experiencing same issue on MAC (Safari).
Same issue here any fixes or workarounds ?
@Toolenaar use the package locally and comment out the code that is using the regex : (?<=\n)
I can confirm that simply commenting the faulting line in whitespace.dart fixes the issue. Cheers @flutterdev06!
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.