Modify ↓
Opened 18 years ago
Closed 18 years ago
#3473 closed defect (wontfix)
spam regex filter should search in MULTILINE mode
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
.10dev
unless there's another way to match different lines easily, i think it would make more sense to match in MULTILINE mode. For example, you could easily use a regex to avoid spam that has 4 links in it by ignoring posts that have (href|http).*(href|http).*(href|http).*(href|http) which would filter most spam, but if the poster put each link on a separate line, it doesn't get filtered.
Attachments (0)
Change History (1)
comment:1 by , 18 years ago
Milestone: | 0.10 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The spam filter is a separate plugin, so the Trac milestones don't apply.
MULTILINE
mode only changes "^" and "$" to match the beginning and end of lines respectively, instead of the default where the match the beginning and end of the entire string. I guess you're asking to enable theDOTALL
mode, where "." matches newlines.Enabling
DOTALL
mode could slow down matching and lead to undesired results with simpler expressions. Instead, "(.|\n)*" withoutDOTALL
should match anything that ".*" would inDOTALL
mode.