[wp-trac] [WordPress Trac] #51044: preprocess_comment filter is mising some data (like user agent)
WordPress Trac
noreply at wordpress.org
Tue Aug 18 08:04:07 UTC 2020
#51044: preprocess_comment filter is mising some data (like user agent)
--------------------------+---------------------
Reporter: zodiac1978 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.6
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+---------------------
Comment (by zodiac1978):
Replying to [comment:1 SergeyBiryukov]:
> Good catch, it seems like the filter should be moved directly above the
`wp_filter_comment()` call.
I do not think that's the correct way here, because the filter would
change the behavior then.
The description of the filter is: "Filters a comment’s data *before* it is
sanitized" (emphasize mine). if we move the filter before the
`wp_filter_comment()` call it would be already sanitized.
But maybe we could move the additions before the filter call?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51044#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list