Skip to content

Make email obfuscation CSP friendly#8992

Merged
doxygen merged 1 commit intodoxygen:masterfrom
AMDmi3:csp-friendly-email-obfuscation
Dec 30, 2021
Merged

Make email obfuscation CSP friendly#8992
doxygen merged 1 commit intodoxygen:masterfrom
AMDmi3:csp-friendly-email-obfuscation

Conversation

@AMDmi3
Copy link
Contributor

@AMDmi3 AMDmi3 commented Dec 30, 2021

Obfuscation makes email addresses harder to harvest by inserting into them HTML elements which are supposed to be invisible in the rendered HTML (display: none). The style is specified inline, and inline styles may be prohibited by content-security-policy HTTP header, breaking the markup if generated html is served from the server which sets such header. So move the style to CSS and refer to it via class in HTML code to fix this.

For content served from a server which sets CSP header, here's how the current doxygen genereted HTML look:
2021-12-30-143020_maim
After the fix:
2021-12-30-143110_maim

Obfuscation makes email addresses harder to harvest by inserting
into them HTML elements which are supposed to be invisible in the
rendered HTML (display: none). The style is specified inline, and
inline styles may be prohibited by content-security-policy HTTP
header, breaking the markup if generated html is served from the
server which sets such header. So move the style to CSS and refer
to it via `class` in HTML code to fix this.
@albert-github albert-github added the HTML HTML / XHTML output label Dec 30, 2021
@doxygen doxygen merged commit 1464355 into doxygen:master Dec 30, 2021
@AMDmi3 AMDmi3 deleted the csp-friendly-email-obfuscation branch December 30, 2021 15:31
@AMDmi3
Copy link
Contributor Author

AMDmi3 commented Dec 30, 2021

Thank you!

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label 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

HTML HTML / XHTML output

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants