Closed Bug 1745760 Opened 2 years ago Closed 1 year ago

[DNR] Prototype of regexFilter condition

Categories

(WebExtensions :: Request Handling, enhancement, P2)

enhancement
Points:
5

Tracking

(firefox112 fixed)

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [wecg])

Attachments

(1 file)

Implement the matcher for URLs using a regular expression.
This is also a prerequisite for implementing the regexSubstitution option of the redirect action.
In a later stage, the set of supported regular expressions should be restricted to enable optimizations. Ultimately the declarativeNetRequest.isRegexSupported method can be used to validate the format.

Blocks: 1745769
Points: --- → 5
Blocks: 1782685

There is currently no clear definition of what regexpFilter should support. A way to prototype is to just allow the syntax of whatever that is available (e.g. JS RegExp or Rust's regex crate that we already use via RustRegex) and then document that there may be restrictions in the future.

Another approach is to agree on what syntax should be supported in regexFilter before implementation.
There is a thread to discuss how regexFilter should look like across browsers at https://github.com/w3c/webextensions/issues/344 .

Priority: P1 → P2
Whiteboard: [mv3-m2] → [wecg]
Blocks: 1745767
Blocks: 1821033
Blocks: 1821051
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/df038045423b
Implement DNR regexFilter and regexSubstitution r=rpl
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: