-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social Link block: Obfuscate email address #57384
Conversation
FYI @mrwweb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @ockham!
The changes look good to me.
I wonder if we should make this optional, but I guess we can do that later if there's a request for it.
I just noticed that we might have to change the escaping from
see https://developer.wordpress.org/reference/functions/antispambot/#comment-2779:
(unless |
Ah, disregard my previous comment. See https://github.com/WordPress/wordpress-develop/blob/0e284447951869fd3ff58b345ec070b0ab97d9bc/src/wp-includes/default-filters.php#L302 and https://github.com/WordPress/wordpress-develop/blob/0e284447951869fd3ff58b345ec070b0ab97d9bc/src/wp-admin/includes/class-wp-comments-list-table.php#L997-L1000. ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and working as expected 👍
What?
Obfuscate the email address in the "Mail" variation of the Social Icon block. See #21876 (comment).
Fixes #21876.
Why?
To make it harder for spambots to harvest email addresses.
How?
By using Core's
antispambot()
function.Testing Instructions
For example,
mailto:user@example.com
becomesScreenshots or screencast
Question
antispambot()
has a second argument,$hex_encoding
, to enable hex encoding (of entities). Should we use that?FWIW, this is what
mailto:user@example.com
becomes with$hex_encoding === 1
: