mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2025-12-26 16:24:56 +08:00
11 lines
333 B
Bash
Executable file
11 lines
333 B
Bash
Executable file
#! /usr/bin/env nix-shell
|
|
#! nix-shell -i python3 -p python3Packages.html-sanitizer
|
|
|
|
from html_sanitizer import Sanitizer
|
|
sanitizer = Sanitizer() # default configuration
|
|
|
|
original='<span style="font-weight:bold">some text</span>'
|
|
print('original: ', original)
|
|
|
|
sanitized=sanitizer.sanitize(original)
|
|
print('sanitized: ', sanitized)
|