# Is there any way I can automatically censor email addresses on posts?

**URL:** <https://meta.discourse.org/t/is-there-any-way-i-can-automatically-censor-email-addresses-on-posts/25407>\
**Category:** Support\
**Created:** [2015 年 2 月 19 日午後 3:50 UTC](https://meta.discourse.org/t/is-there-any-way-i-can-automatically-censor-email-addresses-on-posts/25407 "2015-02-19T15:50:19Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)\
**Post date:** [2021 年 8 月 23 日午後 3:55 UTC](https://meta.discourse.org/t/is-there-any-way-i-can-automatically-censor-email-addresses-on-posts/25407/18 "2021-08-23T15:55:35Z")

</div>

1 月以降に変更があったかはわかりませんが、「Markdown リンク化を有効化」設定が有効な場合、この機能は半分しか機能していないようです。

正規表現はテキストの伏字化に完璧に機能しますが、その前にメールアドレスがパースされて `mailto` リンクに変換されてしまい、HTML 内にメールアドレスが露呈してしまいます。

例：

```plaintext
<a href="mailto:someone@example.com">■■■■■■■■■■■■■■■■■■■</a>

```

---

_[View the full topic](https://meta.discourse.org/t/is-there-any-way-i-can-automatically-censor-email-addresses-on-posts/25407)._
