Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

obscure-links

Obscure mailto: and tel: links in HTML by replacing characters with numeric HTML entities.

Installation

Directly from github:

pip install --upgrade https://github.com/dbort/obscure-links/tarball/main

Or from a local clone:

pip install .

Usage

Run as a filter (stdin -> stdout):

cat input.html | obscure-links > output.html

Or with files:

obscure-links -i input.html -o output.html

Notes

  • Only <a> tags whose href starts with mailto: or tel: (case-insensitive) are modified.
  • For anchor contents, only text nodes are converted; nested HTML elements are preserved.

Running tests

This project uses pytest.

Install test dependencies:

# Via optional extras
pip install '.[test]'

or

# Via requirements file
pip install -r requirements-test.txt

Run the tests:

pytest

License

MIT License — see LICENSE.

About

Obscure `mailto:` and `tel:` links in HTML by replacing characters with numeric HTML entities.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages