GEO stands for "Gracefully E-mail Obfuscation". This package implements the solution exposed in this post of A List Apart, authored by Roel Van Gils:
http://www.alistapart.com/articles/gracefulemailobfuscation/
collective.geotransform uses plone.transformchain to transform the response output from Zope before it reaches your browser. It searches for all "mailto:" occurrences inside the response and transforms them into encoded harmless links. It also searches for plain email addresses (without links) inside the response and transforms them into encrypted spans. This codification is done via a simple base64 encoding, but enough to fool a spam robot.
This is the form of the encoded mailto link:
<a rel="nofollow" href="geomailto:dmljdG9yLmZlcm5hbmRlejJAdXBjbmV0LmVz">Link text</a>While this is the form of the encoded span for plain email address:
<span class="geomailaddress">dmljdG9yLmZlcm5hbmRlejJAdXBjbmV0LmVz</span>On the browser side, the encoded links and spans are decoded to their original form by using a Javascript that restores them to normal "mailto:" links and decrypted plain text emails.
Authenticated responses are NOT affected by this transform. Only anonymous responses are modified.
Version 4.x supports Plone 6.1 on Python 3.10 to 3.13, and Plone 6.2 on Python 3.10 to 3.14.
Older versions support older Plone versions:
- Plone 6.0: versions 3.x
- Plone 5: versions 2.x
- Plone 4: versions 1.x
Add collective.geotransform to the dependencies of your project (with pip, uv or buildout), restart Plone, then activate the add-on in the Add-ons control panel.
Requires uv. This installs the package with Plone 6.2.3 in .venv (use PLONE_VERSION=6.1.6 make install for another version) and the prek git hook.
make install
make start # Plone on http://localhost:8080 (admin / admin)
make console # Python console with the Zope application as `app`Create a Plone site, then activate collective.geotransform in the Add-ons control panel. The transform only applies to anonymous responses: log out (or use a private window) to see the obfuscated links.
Tests run through tox, as the CI does. The robot scenario checks that the browser decodes the links: it runs Selenium with headless Chrome.
make test # Plone 6.2.3
uvx --with tox-uv tox -e py312-plone61 # one Plone / Python combination
make test-all # lint, every combination, dependenciesWithout tox:
.venv/bin/zope-testrunner --all --test-path=src -s collective.geotransformmake check # format then lint (pyupgrade, isort, black, flake8...).editorconfig, .flake8, .gitignore, .pre-commit-config.yaml, tox.ini,
.github/ and the tool sections of pyproject.toml are generated by
plone.meta: change .meta.toml, then run
uvx --from plone.meta config-package --no-commit --branch current ..
make release # zest.releaser fullrelease, run through uvx- Issue Tracker: https://github.com/collective/collective.geotransform/issues
- Source Code: https://github.com/collective/collective.geotransform
The project is licensed under the GPLv2 or later.
- Accessibility form and validators