Skip to content

Conversation

@AMDmi3
Copy link
Contributor

@AMDmi3 AMDmi3 commented Dec 29, 2021

I've noticed that my email is obfuscated in Doxygen output, and that's definitely not that I want. There was no option to disable this behavior and I've added one. The default behavior is unchanged, but specifying OBFUSCATE_EMAILS = False in Doxyfile disables obfuscation.

Here's an example case:

README.md: Dmitry Marakasov <amdmi3@amdmi3.ru>
Doxyfile1: USE_MDFILE_AS_MAINPAGE = README.md
Doxyfile2: USE_MDFILE_AS_MAINPAGE = README.md
Doxyfile2: OBFUSCATE_EMAILS = False

Diff for generated html/index.html with Doxyfile1 and Doxyfile2:

--- html/index.html	2021-12-29 17:03:55.598158000 +0300
+++ html/index.html	2021-12-29 17:03:59.660321000 +0300
@@ -65,7 +65,7 @@
   <div class="headertitle"><div class="title">My Project </div></div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><p ><a class="anchor" id="md_README"></a> Dmitry Marakasov <a href="#" onclick="location.href='mai'+'lto:'+'amd'+'mi'+'3@a'+'md'+'mi3'+'.r'+'u'amdmi<span style="display: none;">.nosp@m.</span>3@am<span style="display: none;">.nosp@m.</span>dmi3.<span style="display: none;">.nosp@m.</span>ru</a> </p>
+<div class="textblock"><p ><a class="anchor" id="md_README"></a> Dmitry Marakasov <a href="mailto:amdmi3@amdmi3.ru">amdmi3@amdmi3.ru</a> </p>
 </div></div><!-- PageDoc -->
 </div><!-- contents -->
 <!-- start footer part -->

@doxygen
Copy link
Owner

doxygen commented Dec 29, 2021

@AMDmi3 Can you motivate why you do not want obfuscation? The idea behind it is to avoid that web scrapers can easily collect the mail addresses and start sending spam.

Copy link
Collaborator

@albert-github albert-github left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally when you would click on the link the default mailer would open with the right address.
What is the reason that you want to have your email address readable in the documentation?
Wouldn't it be a easier potential way to get spam mail?

@AMDmi3 AMDmi3 force-pushed the optional-email-obfuscation branch from 0ea9694 to 08cda15 Compare December 29, 2021 14:28
@AMDmi3
Copy link
Contributor Author

AMDmi3 commented Dec 29, 2021

@doxygen @albert-github it should be obvious, I want my email to be readable both as text (without .nosp@m. garbage) and also be a valid link, including for people with disabled javascript. The spam problem is fictional for me.

const char *p = url.data();
uint size=3;
while (*p)
if (!Config_getBool(OBFUSCATE_EMAILS)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow doxygen's coding style, i.e. matching braces should be aligned on the same column. I had already fixed this, but your force commit undid my changes, so please do them yourself this time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@AMDmi3 AMDmi3 force-pushed the optional-email-obfuscation branch from 08cda15 to fe818b6 Compare December 29, 2021 14:54
@AMDmi3
Copy link
Contributor Author

AMDmi3 commented Dec 29, 2021

Oh, and I've just realized one thing: the link text is in fact intended to be readable. For me it is not though, and that's caused by content-security-policy: HTTP header which disables embedded styles. visibility: hidden bit should also be moved into the CSS and class should be used in <span> insertions. Submitted as #8992.

@doxygen doxygen merged commit f784799 into doxygen:master Dec 30, 2021
@albert-github
Copy link
Collaborator

Shouldn't this option also have the depends='GENERATE_HTML' as it is just for HTML?

@albert-github albert-github added enhancement a request to enhance doxygen, not a bug fixed but not released Bug is fixed in github, but still needs to make its way to an official release labels Dec 30, 2021
@doxygen
Copy link
Owner

doxygen commented Dec 30, 2021

Good point, I fixed it: 5da7df8

@AMDmi3 AMDmi3 deleted the optional-email-obfuscation branch December 30, 2021 11:51
AMDmi3 added a commit to libSDL2pp/libSDL2pp that referenced this pull request Dec 30, 2021
@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement a request to enhance doxygen, not a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants