Add unsupported regular expressions in Content Blocker url-filter
Originator: | kyle.hickinson | ||
Number: | rdar://FB7557881 | Date Originated: | |
Status: | Open | Resolved: | |
Product: | WebKit | Product Version: | |
Classification: | Suggestion | Reproducible: |
The Content Blocker url-filter string is very limiting in terms of available regex syntax. As seen here: https://developer.apple.com/documentation/safariservices/creating_a_content_blocker, it specifies that `url-filter` can be used to match more than just a specific URL, using regular expressions. However the then listed supported characters is only a very limited subset of regular expressions. The API should allow use of all or most of the regex language as seen here: https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference At Brave we use a combination of blocklists and many rules include basic regex such as logical or's and lookaheads. This makes it very difficult to convert rules written for AdBlock Plus or uBlock Origin without changing the underlying rule or splitting them into multiple rules.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!