# SPDX-FileCopyrightText: OpenSSF project contributors # SPDX-License-Identifier: MIT """Code Example""" import re import unicodedata def write_message(input_string: str): """Normalize and validate untrusted string before storing Parameters: input_string(string): String to validate """ message = unicodedata.normalize("NFC", input_string) # validate, exclude dangerous tags: for tag in re.findall("<[^>]*>", message): if tag in ["