Search.setIndex({"docnames": ["changes", "clean", "dev", "goals", "index", "linkify", "migrating"], "filenames": ["changes.rst", "clean.rst", "dev.rst", "goals.rst", "index.rst", "linkify.rst", "migrating.rst"], "titles": ["Bleach changes", "Sanitizing text fragments", "Bleach development", "Goals of Bleach", "Bleach", "Linkifying text fragments", "Migrating from the html5lib sanitizer"], "terms": {"bug": 0, "add": [0, 1, 3, 5], "miss": 0, "comma": 0, "tinycss2": 0, "requir": [0, 2], "thank": 0, "you": [0, 1, 2, 3, 4, 5, 6], "shadchin": 0, "url": [0, 3, 4, 5], "pars": [0, 1, 3, 5], "test": [0, 3, 4], "base": [0, 4], "wpt": 0, "688": 0, "support": [0, 2], "scheme": [0, 5], "less": [0, 3], "http": [0, 1, 2, 4, 5, 6], "i": [0, 1, 2, 4, 5, 6], "allow": [0, 4, 5], "list": [0, 4, 5], "662": 0, "handl": [0, 1, 3, 5], "escap": [0, 1, 3, 4, 5], "edg": 0, "case": [0, 3, 4, 5], "where": [0, 5], "doesn": [0, 3], "t": [0, 1, 3, 4, 5, 6], "start": [0, 5], "tag": [0, 2, 3, 4, 6], "544": 0, "fix": [0, 4], "refer": 0, "warn": [0, 5, 6], "doc": [0, 4], "660": 0, "correctli": 0, "urlencod": 0, "email": [0, 2, 3, 4], "address": [0, 2, 3, 4], "part": [0, 6], "larseggert": 0, "659": 0, "backward": [0, 4], "incompat": [0, 4], "clean": [0, 1, 4, 5, 6], "linkifi": [0, 3, 4], "now": [0, 1], "preserv": [0, 5], "order": [0, 1], "html": [0, 1, 2, 4, 5, 6], "attribut": [0, 4, 6], "askoretskli": 0, "566": 0, "drop": [0, 1, 6], "python": [0, 2, 5], "hugovk": 0, "629": 0, "css": [0, 2, 4, 6], "sanit": [0, 4, 5], "style": [0, 1, 5, 6], "complet": [0, 5], "differ": [0, 4, 5], "If": [0, 1, 2, 3, 4, 5, 6], "re": [0, 1, 3, 4, 5], "us": [0, 2, 6], "ll": [0, 1, 2, 4, 5, 6], "need": [0, 1, 2, 3, 5, 6], "updat": [0, 2], "your": [0, 1, 3, 4, 6], "code": [0, 1, 5, 6], "instal": [0, 1], "extra": 0, "pip": [0, 1, 2, 4], "see": [0, 3, 4, 5, 6], "document": [0, 1, 4, 5], "how": [0, 5], "do": [0, 1, 3, 4, 5], "633": 0, "rework": 0, "dev": [0, 2], "depend": [0, 1], "we": [0, 1, 2, 4, 5], "longer": 0, "have": [0, 1, 3, 4, 5], "txt": 0, "instead": 0, "develop": [0, 4], "more": [0, 1, 2, 3, 4, 5, 6], "detail": [0, 2, 3, 4], "620": 0, "newlin": 0, "when": [0, 5, 6], "block": [0, 4], "level": [0, 5], "jvanasco": 0, "369": 0, "featur": [0, 1], "9": 0, "vendor": [0, 2, 4], "stdlib": 0, "urllib": [0, 1, 5], "failur": 0, "536": 0, "unsupport": 0, "520": 0, "secur": [0, 1, 3], "none": [0, 1, 2, 5], "name": [0, 1, 5], "cheesyfeet": 0, "cve": [0, 4], "23980": 0, "ghsa": 0, "vv2x": 0, "vrpj": 0, "qqpq": 0, "bump": [0, 2], "8": 0, "tox": [0, 2], "vendorverifi": [0, 2], "lint": 0, "target": [0, 5], "report": 0, "templat": [0, 1], "script": [0, 2, 3, 4, 6], "detect": 0, "fail": 0, "file": [0, 2, 4, 5], "ar": [0, 1, 2, 3, 4, 5, 6], "releas": [0, 4], "process": [0, 4], "check": [0, 2, 3, 5], "pass": [0, 1, 2, 3, 5], "local": [0, 2, 5], "remov": [0, 1, 2], "django": [0, 1, 3, 4], "present": 0, "v3": 0, "whl": [0, 2], "595": 0, "duplic": 0, "h1": 0, "header": 0, "nguy\u1ec5n": 0, "gia": 0, "phong": 0, "mcsinyx": 0, "comment": [0, 2, 3, 4], "even": [0, 4, 5], "strip_com": [0, 4], "fals": [0, 1, 5], "1621692": 0, "m6xf": 0, "fq7q": 0, "8743": 0, "advisori": 0, "rais": [0, 1, 5], "valueerror": 0, "certain": [0, 5], "input": 0, "googl": 0, "autofuzz": 0, "migrat": [0, 4], "ci": [0, 2], "github": [0, 2, 4, 6], "action": [0, 2], "an": [0, 1, 2, 3, 4, 5, 6], "indexerror": 0, "rel": [0, 1, 4, 5], "nofollow": [0, 1, 4, 5], "mitar": 0, "suppress": 0, "html5lib": [0, 4, 5], "deprecationwarn": 0, "557": 0, "sam": 0, "sneddon": 0, "tests_websit": 0, "terminologi": 0, "thoma": 0, "grainger": 0, "replac": [0, 6], "setuptool": 0, "packag": [0, 5], "benjamin": 0, "peterson": 0, "behavior": [0, 1], "could": [0, 1, 5], "result": [0, 1], "regular": [0, 2, 4], "express": [0, 3], "denial": 0, "servic": 0, "redo": 0, "call": 0, "were": [0, 5], "vulner": [0, 2, 4], "For": [0, 1, 2, 3, 4, 5, 6], "exampl": [0, 1, 3, 4, 5, 6], "thi": [0, 1, 2, 3, 4, 5, 6], "issu": [0, 2, 3, 4, 6], "wa": [0, 2, 5], "confirm": 0, "v2": [0, 4], "earlier": 0, "similar": [0, 2], "should": [0, 1, 2, 3, 5, 6], "consid": [0, 1, 5], "too": 0, "anyon": 0, "encourag": 0, "upgrad": [0, 6], "bugzilla": 0, "mozilla": [0, 2, 3, 4], "org": [0, 2, 4], "show_bug": 0, "cgi": 0, "id": 0, "1623633": 0, "dash": 0, "singl": [0, 5, 6], "doubl": [0, 6], "quot": [0, 3, 5, 6], "valu": [0, 1, 3, 5], "through": [0, 1, 3, 4, 5], "deprec": [0, 6], "setup": [0, 2], "py": [0, 2, 5], "jdufresn": 0, "507": 0, "pypi": [0, 2, 4], "7": 0, "pypy3": 0, "travi": 0, "link": [0, 1, 4], "conduct": 0, "442": 0, "typo": 0, "curren": 0, "current": 0, "test_clean": 0, "timgates42": 0, "504": 0, "non": [0, 1, 4], "ascii": 0, "sekineh": 0, "426": 0, "simplifi": 0, "configur": [0, 1, 3, 5], "make": [0, 1, 2, 5], "reproduc": 0, "lambi": 0, "zborboa": 0, "g": [0, 3, 5], "except": 0, "mastizada": 0, "parser": [0, 1, 6], "nonetyp": 0, "bope": 0, "improv": 0, "tld": [0, 5], "pc": 0, "cohol": 0, "embed": 0, "mathml": 0, "svg": [0, 1], "content": [0, 1, 2, 5], "rcdata": 0, "did": 0, "match": [0, 1, 2, 5], "browser": [0, 4], "mutat": 0, "xss": 0, "strip": [0, 3, 4], "math": 0, "one": [0, 3, 5, 6], "noscript": 0, "nofram": 0, "ifram": 0, "noemb": 0, "xmp": 0, "whitelist": 0, "like": [0, 1, 2, 3, 5], "affect": 0, "raw": 0, "text": [0, 3, 4], "titl": [0, 1, 5], "textarea": 0, "probabl": [0, 4, 6], "highli": 0, "1615315": 0, "recognized_tag": [0, 5], "argument": [0, 1, 5, 6], "linker": [0, 4], "class": [0, 1, 5], "its": [0, 5, 6], "own": [0, 1, 3, 6], "some": [0, 5, 6], "get": [0, 5, 6], "It": [0, 1, 5, 6], "default": [0, 1, 3, 5, 6], "html5": [0, 1, 3], "chad": 0, "birch": 0, "409": 0, "six": 0, "dave": 0, "shawlei": 0, "416": 0, "invalid": [0, 1, 3], "charact": [0, 1], "them": [0, 2, 3, 4, 5, 6], "419": 0, "problem": 0, "linkifyfilt": [0, 4], "being": [0, 1, 3, 5], "abl": [0, 3], "across": 0, "amp": 0, "422": 0, "inputstreamwithmemori": 0, "bleachhtmlpars": 0, "meta": 0, "431": 0, "doctest": [0, 2], "357": 0, "merg": 0, "token": [0, 1], "after": [0, 1, 2, 4], "onli": [0, 1, 3, 5], "374": 0, "just": 0, "fine": [0, 6], "ad": 0, "environ": [0, 2], "so": [0, 3, 4, 5], "offici": [0, 2], "377": 0, "object": [0, 3, 5], "ha": [0, 1, 2, 3, 6], "lower": 0, "398": 0, "abbr": [0, 1], "400": 0, "A": [0, 3, 5], "bunch": 0, "function": [0, 3, 5], "move": 0, "from": [0, 1, 2, 3, 4, 5], "modul": [0, 6], "anoth": [0, 5], "These": [0, 3, 5], "html5lib_shim": [0, 1, 5], "convert_ent": 0, "match_ent": 0, "next_possible_ent": 0, "bleachhtmlseri": 0, "bleachhtmltoken": 0, "weren": 0, "aren": [0, 1], "public": 0, "api": [0, 3, 6], "peopl": 0, "read": [0, 2, 4, 6], "might": [0, 3, 6], "can": [0, 1, 3, 4, 5], "other": [0, 1, 5], "mean": 0, "work": [0, 1, 2, 3, 5], "librari": [0, 2, 3, 4], "regardless": 0, "what": [0, 1], "thei": [0, 1, 5], "386": 0, "long": [0, 5], "stand": 0, "regress": 0, "rewrit": 0, "280": 0, "392": 0, "isindex": 0, "string": [0, 1, 5], "whether": [0, 1, 5], "": [0, 1, 2, 3, 4, 5, 6], "279": 0, "328": 0, "ambigu": 0, "ampersand": 0, "359": 0, "uri": [0, 1], "properli": [0, 3], "contain": [0, 1, 3, 4, 5], "entiti": [0, 6], "possibl": 0, "construct": 0, "would": [0, 1, 3, 5], "slide": 0, "unsanit": 0, "introduc": 0, "1442745": 0, "337": 0, "switch": [0, 5, 6], "semver": [0, 2, 4], "open": [0, 5], "lang": 0, "324": 0, "convert": [0, 5], "control": [0, 1, 3, 5], "backspac": 0, "particularli": 0, "prevent": [0, 3], "malici": [0, 1, 5], "copi": [0, 2, 6], "past": 0, "situat": [0, 5], "298": 0, "com": [0, 1, 2, 4, 5, 6], "all": [0, 2, 5], "previou": [0, 1, 5], "wai": [0, 1, 4, 5], "allevi": 0, "redid": 0, "avail": [0, 3, 4], "__version__": [0, 2], "pkg_resourc": 0, "parse_vers": 0, "307": 0, "accept": [0, 1, 5], "type": [0, 1, 5], "janusz": 0, "292": 0, "unicod": [0, 1, 5], "utf": 0, "encod": [0, 5], "str": [0, 1, 5], "176": 0, "unescap": [0, 1], "includ": [0, 1, 3, 4, 5], "ones": 0, "end": 0, "which": [0, 1, 5], "happen": 0, "place": [0, 5], "143": 0, "insid": [0, 5], "mailto": [0, 1, 5], "sedrub": 0, "300": 0, "clarifi": 0, "polici": 0, "303": 0, "specif": [0, 3, 5, 6], "0b8": 0, "0b9": 0, "0b10": 0, "zolt\u00e1n": 0, "268": 0, "v": [0, 2, 4, 5], "comparison": 0, "readm": 0, "stu": 0, "cox": 0, "278": 0, "keyerror": 0, "without": [0, 5], "href": [0, 1, 3, 4, 5, 6], "attr": [0, 1, 5], "alex": 0, "defsen": 0, "273": 0, "websit": 0, "output": [0, 1, 3], "greg": 0, "guth": 0, "206": 0, "224": 0, "99999999": 0, "new": [0, 1, 2, 3, 5], "sinc": 0, "old": [0, 3], "9999999": 0, "higher": 0, "equival": 0, "friend": 0, "rewritten": 0, "reimplement": 0, "filter": [0, 3, 4, 5, 6], "step": [0, 5], "travers": 0, "serial": [0, 1, 5, 6], "becaus": [0, 3, 4, 5, 6], "compar": 0, "amongst": 0, "thing": [0, 1, 3, 4, 5], "question": 0, "callabl": [0, 1], "take": [0, 1, 6], "three": 0, "previous": 0, "took": [0, 1], "As": 0, "The": [0, 1, 3, 4, 5, 6], "callback": [0, 4], "adjust": [0, 4], "namespac": [0, 3, 5], "d": [0, 5], "someth": [0, 1, 2, 3], "def": [0, 1, 5], "check_protocol": 0, "is_new": 0, "startswith": [0, 5], "return": [0, 1, 5], "u": [0, 2, 4, 6], "further": 0, "sure": [0, 1, 2, 5], "alwai": [0, 5], "don": [0, 3, 4, 5, 6], "assert": 0, "error": [0, 1, 3], "had": 0, "skip_pr": [0, 5], "been": 0, "gener": [0, 2, 5], "skip_tag": [0, 4], "befor": [0, 3, 4], "some_text": 0, "true": [0, 1, 5, 6], "pre": [0, 5], "skip": [0, 4], "want": [0, 1, 3, 5, 6], "linkif": 0, "There": [0, 3], "cleaner": [0, 4, 5], "instanti": 0, "favorit": 0, "set": [0, 1, 2, 3, 4, 6], "easi": 0, "reus": 0, "htm5lib": 0, "arg": 0, "ton": 0, "up": [0, 4], "allowed_protocol": [0, 1, 3], "protocol": [0, 4, 5], "ed2k": 0, "ftp": 0, "irc": 0, "gopher": [0, 5], "nntp": 0, "telnet": 0, "webcal": 0, "xmpp": 0, "callto": 0, "feed": 0, "urn": 0, "aim": 0, "rsync": 0, "ssh": 0, "sftp": 0, "rtsp": 0, "af": 0, "data": [0, 1, 3], "149": 0, "let": [0, 1, 5], "overrid": 0, "andrea": 0, "malecki": 0, "involv": 0, "period": 0, "lorenz": 0, "schori": 0, "219": 0, "port": 0, "alexandr": 0, "macabi": 0, "207": 0, "inappropri": 0, "node": 0, "tail": 0, "132": 0, "161": 0, "nose": 0, "204": 0, "matrix": 0, "230": 0, "limit": [0, 5], "999": 0, "9999": 0, "99999": 0, "bust": 0, "97": 0, "impend": 0, "195": 0, "hang": 0, "parse_email": [0, 4], "124": 0, "crash": 0, "first": [0, 5], "child": 0, "136": 0, "exterior": 0, "bracket": 0, "146": 0, "consist": 0, "etre": 0, "treewalk": [0, 1, 5], "simpletre": 0, "compat": 0, "apach": [0, 4], "licens": [0, 4], "fork": 0, "pin": 0, "95": 0, "due": [0, 5], "major": 0, "break": 0, "inconsist": 0, "consider": 0, "mani": [0, 3], "keyword": [0, 5], "pleas": [0, 2, 4], "inform": [0, 2, 3, 4], "unaccept": 0, "delinkifi": 0, "gone": 0, "_render": 0, "throw": 0, "ignor": 0, "domain": [0, 3, 5], "markup": [0, 3, 4], "within": [0, 5], "bare": 0, "61": 0, "understand": 0, "number": [0, 2, 3], "38": 0, "41": 0, "option": [0, 4, 5], "method": [0, 1, 3, 4, 6], "45": 0, "subdomain": 0, "47": 0, "48": 0, "git": [0, 2], "smarter": 0, "about": [0, 3, 5], "trail": 0, "punctuat": 0, "30": 0, "exc_info": 0, "logger": 0, "dure": 0, "render": [0, 5, 6], "wildcard": 0, "kei": [0, 2, 4, 5], "htmlsanit": 0, "36": 0, "wrap": 0, "parenthes": 0, "23": 0, "safe": [0, 1, 4], "33": 0, "prefix": 0, "31": 0, "32": 0, "slash": 0, "21": 0, "won": 0, "libgl": 0, "22": [0, 5], "context": [1, 5, 6], "provid": [1, 3], "given": 1, "accord": 1, "algorithm": [1, 3], "aspect": 1, "also": [1, 3, 4, 5], "unclos": [1, 3], "misnest": 1, "sanitis": 1, "javascript": 1, "mustach": 1, "handlebar": 1, "angular": [1, 3], "jsx": 1, "etc": [1, 2, 3, 4], "json": 1, "xhtml": 1, "p": [1, 3, 5, 6], "user_bio": [1, 3], "bodi": [1, 3], "bio": [1, 3], "ani": [1, 2, 3, 4, 5], "appropri": [1, 3], "jinja": 1, "allowed_tag": 1, "allowed_attribut": [1, 3, 6], "css_sanit": [1, 6], "sourc": [1, 4, 5], "focus": [1, 3, 4], "whose": 1, "sole": 1, "purpos": 1, "displai": 1, "web": 1, "page": [1, 2, 4, 5], "design": [1, 3], "transform": 1, "import": [1, 4, 5, 6], "better_text": 1, "yucky_text": 1, "lot": [1, 3, 4, 5], "same": [1, 5], "instanc": [1, 5], "paramet": [1, 5], "bool": [1, 5], "disallow": [1, 3], "element": [1, 3, 6], "csssanit": [1, 6], "sanitize_css": [1, 3], "kwarg": 1, "specifi": [1, 3, 4], "tupl": 1, "iter": [1, 5], "b": [1, 5, 6], "lt": [1, 4, 6], "gt": [1, 4, 6], "conserv": 1, "found": [1, 2, 4, 5], "acronym": 1, "blockquot": 1, "em": 1, "li": 1, "ol": 1, "strong": 1, "ul": 1, "map": [1, 3], "chang": [1, 2, 3, 4, 5], "version": [1, 2, 3, 4, 5, 6], "2": [1, 2, 4, 5], "0": [1, 2, 4, 5], "prior": 1, "foo": [1, 5], "color": [1, 5, 6], "red": 1, "font": [1, 5], "weight": [1, 5], "bold": [1, 5], "blah": 1, "alt": 1, "img": 1, "width": 1, "500": 1, "keep": [1, 5], "run": [1, 2, 5], "everi": [1, 4], "allow_h": 1, "h": 1, "urlpars": [1, 5], "allow_src": 1, "height": 1, "src": 1, "netloc": [1, 5], "mydomain": 1, "In": [1, 3, 5], "anchor": 1, "mai": [1, 3, 4, 5, 6], "adapt": 1, "smb": 1, "more_text": 1, "By": [1, 5, 6], "span": 1, "rather": 1, "entir": [1, 3], "out": [1, 3, 5], "To": [1, 2], "disabl": 1, "my": [1, 3, 5], "addit": [1, 2, 5], "allowed_css_properti": [1, 6], "heavi": 1, "store": 1, "allowed_svg_properti": 1, "silent": 1, "parseerror": 1, "atrul": 1, "media": [1, 3], "implement": 1, "5": [1, 4], "better": 1, "creat": [1, 2, 5], "all_the_yucky_th": 1, "thread": 1, "intern": 1, "state": 1, "separ": 1, "per": 1, "initi": 1, "stream": [1, 5], "readthedoc": [1, 2, 4], "io": [1, 4], "en": [1, 2, 4], "latest": [1, 4], "movingpart": 1, "typeerror": [1, 5], "consequ": 1, "back": [1, 5], "here": [1, 5, 6], "trivial": 1, "moofilt": 1, "__iter__": 1, "self": 1, "starttag": 1, "emptytag": 1, "item": [1, 5], "moo": 1, "yield": 1, "dirti": 1, "cute": 1, "puppi": 1, "jpg": 1, "whatev": 1, "appli": [1, 4], "maintain": [1, 6], "safeti": [1, 3], "guarante": [1, 3, 5], "doe": [1, 3, 5], "anywher": [1, 5], "allowed_el": [1, 6], "strip_disallowed_el": 1, "strip_html_com": 1, "clone": 2, "repo": 2, "activ": 2, "virtual": 2, "e": [2, 3, 5, 6], "project": [2, 3, 4], "our": [2, 4], "tracker": [2, 4], "believ": [2, 4], "ve": [2, 4], "send": [2, 4, 5], "AT": [2, 4], "dot": [2, 4], "relat": [2, 4], "disclosur": [2, 4], "pgp": [2, 4], "encrypt": [2, 4], "mail": [2, 4, 5], "verifi": [2, 3, 4], "respons": [2, 4], "receiv": [2, 4], "wiki": [2, 4], "www": [2, 4, 5], "for_develop": [2, 4], "sphinx": 2, "push": 2, "via": [2, 3, 5], "webhook": 2, "That": [2, 5], "note": 2, "necessari": 2, "binari": 2, "pull": 2, "request": [2, 3], "event": [2, 3], "checkout": 2, "main": 2, "tip": 2, "correct": 2, "wise": 2, "__init__": 2, "minor": 2, "unvendor": 2, "__releasedate__": 2, "20120731": 2, "contributor": 2, "manifest": 2, "md": [2, 4], "build": [2, 5], "cd": 2, "second": [2, 5], "invoc": 2, "exit": 2, "tmp": 2, "exist": [2, 5], "zero": 2, "run_test": 2, "sh": 2, "everyth": [2, 5], "els": [2, 5], "commit": 2, "caus": 2, "sign": 2, "v0": 2, "4": [2, 4], "distribut": 2, "sdist": 2, "bdist_wheel": 2, "saniti": 2, "size": 2, "l": 2, "lh": 2, "dist": 2, "tar": 2, "tvzf": 2, "gz": 2, "unzip": 2, "py2": 2, "py3": 2, "upload": 2, "twine": 2, "blog": [2, 3], "post": 2, "twitter": 2, "hope": 3, "explicitli": 3, "evolv": 3, "stronger": 3, "direct": 3, "prone": 3, "futur": 3, "proof": 3, "opt": 3, "onclick": 3, "handler": 3, "ontouch": 3, "primari": 3, "larger": 3, "section": [3, 4, 5], "profil": 3, "descript": 3, "product": 3, "applic": 3, "tradition": 3, "inject": 3, "annoi": 3, "proactiv": 3, "chapter": [3, 6], "info": [3, 6], "secondari": 3, "mechan": 3, "find": [3, 4], "alter": 3, "while": [3, 5, 6], "itself": 3, "oper": 3, "model": [3, 5], "flexibl": 3, "enough": 3, "creation": 3, "extrem": 3, "wide": 3, "rang": 3, "try": 3, "valid": [3, 5], "beyond": 3, "well": 3, "form": 3, "fragment": [3, 4, 6], "untrust": [3, 4], "onc": 3, "whole": 3, "forbid": 3, "jinja2": 3, "util": 3, "much": 3, "faster": [3, 5], "tool": [3, 5], "power": 3, "fast": 3, "reli": [3, 4], "mess": 3, "afterward": 3, "interest": 3, "properti": [3, 5, 6], "danger": 3, "opera": 3, "o": 3, "pain": 3, "nearli": 3, "anyth": 3, "gadget": 3, "usual": 3, "produc": 3, "nor": 3, "syntax": 3, "bind": 3, "knockout": 3, "j": 3, "ng": 3, "vector": 3, "ie": 3, "netscap": 3, "firefox": 3, "compon": 3, "fingerprint": 3, "extern": [3, 5], "queri": 3, "track": [3, 5, 6], "pixel": 3, "x": 3, "built": 3, "upon": 3, "why": 3, "simpler": 3, "give": [3, 6], "over": [3, 5], "alphabet": 3, "broken": 3, "regard": 3, "isn": 3, "veri": 3, "restrict": 3, "expans": 3, "author": 3, "claim": 3, "urliz": 4, "cannot": 4, "alreadi": [4, 5, 6], "intend": 4, "yourself": 4, "jump": 4, "hoop": 4, "site": [4, 5], "administr": 4, "outsid": 4, "either": 4, "trust": 4, "those": [4, 5], "user": [4, 5, 6], "good": [4, 6], "modern": 4, "deal": 4, "weird": [4, 5], "quirki": 4, "And": [4, 5], "unbalanc": 4, "mi": 4, "nest": 4, "most": [4, 6], "date": 4, "full": 4, "privat": 4, "land": 4, "mark": 4, "relev": 4, "newer": 4, "follow": [4, 5, 6], "patch": 4, "simplest": 4, "evil": 4, "repositori": 4, "govern": 4, "etiquett": 4, "guidelin": 4, "code_of_conduct": 4, "bleachsanitizerfilt": 4, "goal": [4, 6], "1": [4, 6], "june": 4, "27th": 4, "2022": 4, "april": 4, "7th": 4, "august": 4, "25th": 4, "2021": 4, "3rd": 4, "3": 4, "juli": 4, "14th": 4, "februari": 4, "1st": 4, "januari": 4, "26th": 4, "20th": 4, "septemb": 4, "18th": 4, "2020": 4, "16th": 4, "29th": 4, "march": 4, "24th": 4, "17th": 4, "11th": 4, "13th": 4, "9th": 4, "2019": 4, "octob": 4, "2018": 4, "5th": 4, "decemb": 4, "2017": 4, "2nd": 4, "28th": 4, "8th": 4, "novemb": 4, "4th": 4, "2016": 4, "23rd": 4, "11": 4, "2015": 4, "15": 4, "2014": 4, "12": 4, "18": 4, "2013": 4, "19": 4, "28": 4, "10": 4, "2012": 4, "17": 4, "24": 4, "2011": 4, "14": 4, "6": 4, "path": 4, "index": 4, "search": [4, 5], "come": 5, "sever": 5, "tree": 5, "plan": 5, "attempt": 5, "protect": 5, "bad": [5, 6], "decept": 5, "shorten": 5, "internation": 5, "idn": 5, "resembl": 5, "legitim": 5, "homograph": 5, "attack": 5, "background": 5, "unavail": 5, "recommend": [5, 6], "default_callback": 5, "look": 5, "best": [5, 6], "effort": [5, 6], "approach": 5, "tri": 5, "recov": 5, "crazi": 5, "twice": 5, "modifi": 5, "each": 5, "my_callback": 5, "dict": 5, "_text": 5, "innertext": 5, "boolean": 5, "indic": 5, "must": 5, "next": 5, "leav": [5, 6], "left": 5, "set_titl": 5, "abc": 5, "stomp": 5, "tab": 5, "set_target": 5, "_blank": 5, "pop": 5, "easili": 5, "allowed_attr": 5, "k": 5, "super": 5, "Or": 5, "remove_titl": 5, "overwrit": 5, "outgo": 5, "length": 5, "shorten_url": 5, "overli": 5, "newli": 5, "len": 5, "25": 5, "longlonglonglonglongurl": 5, "lon": 5, "go": 5, "bouncer": 5, "outgoing_bounc": 5, "href_kei": 5, "bn": 5, "ce": 5, "destin": 5, "3a": 5, "slightli": 5, "complex": 5, "inspir": 5, "crate": 5, "often": 5, "cctld": 5, "paraguai": 5, "dedic": 5, "odd": 5, "write": 5, "dont_linkify_python": 5, "origin": 5, "link_text": 5, "endswith": 5, "written": 5, "remove_mailto": 5, "janet": 5, "special": 5, "liter": 5, "div": [5, 6], "exactli": 5, "care": 5, "behav": 5, "c": 5, "f": 5, "top": 5, "build_url_r": 5, "only_fish_tld_url_r": 5, "fish": 5, "url_r": 5, "only_https_url_r": 5, "punycod": 5, "both": 5, "format": 5, "\u0440\u0444": 5, "xn": 5, "80aaksdi3bpu": 5, "p1ai": 5, "\u0434\u0430\u0439\u0442\u0440\u0430\u0444\u0438\u043a": 5, "puny_link": 5, "similarli": 5, "build_email_r": 5, "email_r": 5, "custom": 5, "recogn": 5, "html_tag": 5, "regex": 5, "know": 5, "walk": 5, "wherev": 5, "functool": 5, "partial": 5, "edit": 5, "bleach": 6, "encount": 6, "spend": 6, "time": 6, "tune": 6, "html5parser": 6, "htmlparser": 6, "parsed_frag": 6, "parsefrag": 6, "print": 6, "alon": 6, "correspond": 6, "becom": 6, "39": 6, "34": 6, "hi": 6, "wish": 6, "retain": 6, "behaviour": 6, "respect": 6, "stick": 6, "static": 6, "oppos": 6, "dynam": 6, "disappear": 6, "unless": 6, "unsaf": 6, "safe_html": 6}, "objects": {"bleach": [[1, 0, 1, "", "clean"], [5, 0, 1, "", "linkify"]], "bleach.linkifier": [[5, 1, 1, "", "DEFAULT_CALLBACKS"], [5, 2, 1, "", "Linker"], [5, 2, 1, "", "LinkifyFilter"]], "bleach.linkifier.Linker": [[5, 3, 1, "", "linkify"]], "bleach.sanitizer": [[1, 1, 1, "", "ALLOWED_ATTRIBUTES"], [1, 1, 1, "", "ALLOWED_PROTOCOLS"], [1, 1, 1, "", "ALLOWED_TAGS"], [1, 2, 1, "", "BleachSanitizerFilter"], [1, 2, 1, "", "Cleaner"]], "bleach.sanitizer.Cleaner": [[1, 3, 1, "", "clean"]]}, "objtypes": {"0": "py:function", "1": "py:data", "2": "py:class", "3": "py:method"}, "objnames": {"0": ["py", "function", "Python function"], "1": ["py", "data", "Python data"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"]}, "titleterms": {"bleach": [0, 1, 2, 3, 4, 5], "chang": 0, "version": 0, "5": 0, "0": 0, "1": 0, "june": 0, "27th": 0, "2022": 0, "april": 0, "7th": 0, "4": 0, "august": 0, "25th": 0, "2021": 0, "3rd": 0, "3": 0, "juli": 0, "14th": 0, "februari": 0, "1st": 0, "2": 0, "januari": 0, "26th": 0, "20th": 0, "septemb": 0, "18th": 0, "2020": 0, "16th": 0, "29th": 0, "march": 0, "24th": 0, "17th": 0, "11th": 0, "13th": 0, "9th": 0, "2019": 0, "octob": 0, "2018": 0, "5th": 0, "decemb": 0, "2017": 0, "2nd": 0, "28th": 0, "8th": 0, "novemb": 0, "4th": 0, "2016": 0, "mai": 0, "23rd": 0, "11": 0, "2015": 0, "15": 0, "2014": 0, "12": 0, "18": 0, "2013": 0, "19": 0, "28": 0, "10": 0, "2012": 0, "17": 0, "24": 0, "2011": 0, "14": 0, "6": 0, "sanit": [1, 3, 6], "text": [1, 5], "fragment": [1, 5], "allow": [1, 3, 6], "tag": [1, 5], "attribut": [1, 3, 5], "As": 1, "list": [1, 3, 6], "dict": 1, "us": [1, 3, 4, 5], "function": 1, "protocol": 1, "strip": 1, "markup": 1, "comment": 1, "strip_com": 1, "css": [1, 3], "cleaner": 1, "html5lib": [1, 3, 6], "filter": 1, "bleachsanitizerfilt": 1, "develop": 2, "instal": [2, 4], "code": [2, 4], "conduct": [2, 4], "report": [2, 4], "bug": [2, 4], "secur": [2, 4], "doc": 2, "test": 2, "releas": 2, "process": 2, "goal": 3, "content": [3, 4], "alwai": 3, "take": 3, "base": 3, "approach": 3, "main": 3, "i": 3, "input": 3, "malici": 3, "safe": 3, "creat": 3, "link": [3, 5], "non": 3, "complet": 3, "html": 3, "document": 3, "json": 3, "xhtml": 3, "svg": 3, "other": 3, "context": 3, "remov": [3, 5], "all": 3, "transform": 3, "some": 3, "web": 3, "page": 3, "purpos": 3, "clean": 3, "up": 3, "after": 3, "trust": 3, "user": 3, "make": 3, "look": 3, "pretti": 3, "sane": 3, "arbitrari": 3, "style": 3, "usag": 3, "javascript": 3, "framework": 3, "templat": 3, "languag": 3, "protect": 3, "against": 3, "xss": 3, "attack": 3, "legaci": 3, "browser": 3, "privaci": 3, "cross": 3, "site": 3, "http": 3, "leak": 3, "v": 3, "upgrad": 4, "basic": 4, "indic": 4, "tabl": 4, "linkifi": 5, "callback": 5, "adjust": 5, "set": 5, "alter": 5, "prevent": 5, "skip": 5, "specifi": 5, "block": 5, "skip_tag": 5, "email": 5, "address": 5, "parse_email": 5, "linker": 5, "linkifyfilt": 5, "migrat": 6, "from": 6, "path": 6, "escap": 6, "differ": 6}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"Bleach changes": [[0, "bleach-changes"]], "Version 5.0.1 (June 27th, 2022)": [[0, "version-5-0-1-june-27th-2022"]], "Version 5.0.0 (April 7th, 2022)": [[0, "version-5-0-0-april-7th-2022"]], "Version 4.1.0 (August 25th, 2021)": [[0, "version-4-1-0-august-25th-2021"]], "Version 4.0.0 (August 3rd, 2021)": [[0, "version-4-0-0-august-3rd-2021"]], "Version 3.3.1 (July 14th, 2021)": [[0, "version-3-3-1-july-14th-2021"]], "Version 3.3.0 (February 1st, 2021)": [[0, "version-3-3-0-february-1st-2021"]], "Version 3.2.3 (January 26th, 2021)": [[0, "version-3-2-3-january-26th-2021"]], "Version 3.2.2 (January 20th, 2021)": [[0, "version-3-2-2-january-20th-2021"]], "Version 3.2.1 (September 18th, 2020)": [[0, "version-3-2-1-september-18th-2020"]], "Version 3.2.0 (September 16th, 2020)": [[0, "version-3-2-0-september-16th-2020"]], "Version 3.1.5 (April 29th, 2020)": [[0, "version-3-1-5-april-29th-2020"]], "Version 3.1.4 (March 24th, 2020)": [[0, "version-3-1-4-march-24th-2020"]], "Version 3.1.3 (March 17th, 2020)": [[0, "version-3-1-3-march-17th-2020"]], "Version 3.1.2 (March 11th, 2020)": [[0, "version-3-1-2-march-11th-2020"]], "Version 3.1.1 (February 13th, 2020)": [[0, "version-3-1-1-february-13th-2020"]], "Version 3.1.0 (January 9th, 2019)": [[0, "version-3-1-0-january-9th-2019"]], "Version 3.0.2 (October 11th, 2018)": [[0, "version-3-0-2-october-11th-2018"]], "Version 3.0.1 (October 9th, 2018)": [[0, "version-3-0-1-october-9th-2018"]], "Version 3.0.0 (October 3rd, 2018)": [[0, "version-3-0-0-october-3rd-2018"]], "Version 2.1.4 (August 16th, 2018)": [[0, "version-2-1-4-august-16th-2018"]], "Version 2.1.3 (March 5th, 2018)": [[0, "version-2-1-3-march-5th-2018"]], "Version 2.1.2 (December 7th, 2017)": [[0, "version-2-1-2-december-7th-2017"]], "Version 2.1.1 (October 2nd, 2017)": [[0, "version-2-1-1-october-2nd-2017"]], "Version 2.1 (September 28th, 2017)": [[0, "version-2-1-september-28th-2017"]], "Version 2.0 (March 8th, 2017)": [[0, "version-2-0-march-8th-2017"]], "Version 1.5 (November 4th, 2016)": [[0, "version-1-5-november-4th-2016"]], "Version 1.4.3 (May 23rd, 2016)": [[0, "version-1-4-3-may-23rd-2016"]], "Version 1.4.2 (September 11, 2015)": [[0, "version-1-4-2-september-11-2015"]], "Version 1.4.1 (December 15, 2014)": [[0, "version-1-4-1-december-15-2014"]], "Version 1.4 (January 12, 2014)": [[0, "version-1-4-january-12-2014"]], "Version 1.3": [[0, "version-1-3"]], "Version 1.2.2 (May 18, 2013)": [[0, "version-1-2-2-may-18-2013"]], "Version 1.2.1 (February 19, 2013)": [[0, "version-1-2-1-february-19-2013"]], "Version 1.2 (January 28, 2013)": [[0, "version-1-2-january-28-2013"]], "Version 1.1.5": [[0, "version-1-1-5"]], "Version 1.1.4": [[0, "version-1-1-4"]], "Version 1.1.3 (July 10, 2012)": [[0, "version-1-1-3-july-10-2012"]], "Version 1.1.2 (June 1, 2012)": [[0, "version-1-1-2-june-1-2012"]], "Version 1.1.1 (February 17, 2012)": [[0, "version-1-1-1-february-17-2012"]], "Version 1.1.0 (October 24, 2011)": [[0, "version-1-1-0-october-24-2011"]], "Version 1.0.4 (September 2, 2011)": [[0, "version-1-0-4-september-2-2011"]], "Version 1.0.3 (June 14, 2011)": [[0, "version-1-0-3-june-14-2011"]], "Version 1.0.2 (June 6, 2011)": [[0, "version-1-0-2-june-6-2011"]], "Version 1.0.1 (April 12, 2011)": [[0, "version-1-0-1-april-12-2011"]], "Sanitizing text fragments": [[1, "sanitizing-text-fragments"]], "Allowed tags (tags)": [[1, "allowed-tags-tags"]], "Allowed Attributes (attributes)": [[1, "allowed-attributes-attributes"]], "As a list": [[1, "as-a-list"]], "As a dict": [[1, "as-a-dict"]], "Using functions": [[1, "using-functions"]], "Allowed protocols (protocols)": [[1, "allowed-protocols-protocols"]], "Stripping markup (strip)": [[1, "stripping-markup-strip"]], "Stripping comments (strip_comments)": [[1, "stripping-comments-strip-comments"]], "Sanitizing CSS": [[1, "sanitizing-css"]], "Using bleach.sanitizer.Cleaner": [[1, "using-bleach-sanitizer-cleaner"]], "html5lib Filters (filters)": [[1, "html5lib-filters-filters"]], "Using bleach.sanitizer.BleachSanitizerFilter": [[1, "using-bleach-sanitizer-bleachsanitizerfilter"]], "Bleach development": [[2, "bleach-development"]], "Install for development": [[2, "install-for-development"]], "Code of conduct": [[2, "code-of-conduct"]], "Reporting Bugs": [[2, "reporting-bugs"], [4, "reporting-bugs"]], "Reporting security bugs": [[2, "reporting-security-bugs"]], "Docs": [[2, "docs"]], "Testing": [[2, "testing"]], "Release process": [[2, "release-process"]], "Goals of Bleach": [[3, "goals-of-bleach"]], "Contents": [[3, "contents"], [4, "contents"]], "Goals": [[3, "goals"]], "Always take a allowed-list-based approach": [[3, "always-take-a-allowed-list-based-approach"]], "Main goal is to sanitize input of malicious content": [[3, "main-goal-is-to-sanitize-input-of-malicious-content"]], "Safely create links": [[3, "safely-create-links"]], "Non-Goals": [[3, "non-goals"]], "Sanitize complete HTML documents": [[3, "sanitize-complete-html-documents"]], "Sanitize for use in HTML attributes, CSS, JSON, xhtml, SVG, or other contexts": [[3, "sanitize-for-use-in-html-attributes-css-json-xhtml-svg-or-other-contexts"]], "Remove all HTML or transforming content for some non-web-page purpose": [[3, "remove-all-html-or-transforming-content-for-some-non-web-page-purpose"]], "Clean up after trusted users": [[3, "clean-up-after-trusted-users"]], "Make malicious content look pretty or sane": [[3, "make-malicious-content-look-pretty-or-sane"]], "Allow arbitrary styling": [[3, "allow-arbitrary-styling"]], "Usage with Javascript frameworks and template languages": [[3, "usage-with-javascript-frameworks-and-template-languages"]], "Protect against CSS-based XSS attacks in legacy browsers": [[3, "protect-against-css-based-xss-attacks-in-legacy-browsers"]], "Protect against privacy, cross site, or HTTP leaks": [[3, "protect-against-privacy-cross-site-or-http-leaks"]], "Bleach vs html5lib": [[3, "bleach-vs-html5lib"]], "Bleach": [[4, "bleach"]], "Security": [[4, "security"]], "Installing Bleach": [[4, "installing-bleach"]], "Upgrading Bleach": [[4, "upgrading-bleach"]], "Basic use": [[4, "basic-use"]], "Code of Conduct": [[4, "code-of-conduct"]], "Indices and tables": [[4, "indices-and-tables"]], "Linkifying text fragments": [[5, "linkifying-text-fragments"]], "Callbacks for adjusting attributes (callbacks)": [[5, "callbacks-for-adjusting-attributes-callbacks"]], "Setting Attributes": [[5, "setting-attributes"]], "Removing Attributes": [[5, "removing-attributes"]], "Altering Attributes": [[5, "altering-attributes"]], "Preventing Links": [[5, "preventing-links"]], "Removing Links": [[5, "removing-links"]], "Skipping links in specified tag blocks (skip_tags)": [[5, "skipping-links-in-specified-tag-blocks-skip-tags"]], "Linkifying email addresses (parse_email)": [[5, "linkifying-email-addresses-parse-email"]], "Using bleach.linkifier.Linker": [[5, "using-bleach-linkifier-linker"]], "Using bleach.linkifier.LinkifyFilter": [[5, "using-bleach-linkifier-linkifyfilter"]], "Migrating from the html5lib sanitizer": [[6, "migrating-from-the-html5lib-sanitizer"]], "Migration path": [[6, "migration-path"]], "Escaping differences": [[6, "escaping-differences"]], "Different allow lists": [[6, "different-allow-lists"]]}, "indexentries": {"allowed_attributes (in module bleach.sanitizer)": [[1, "bleach.sanitizer.ALLOWED_ATTRIBUTES"]], "allowed_protocols (in module bleach.sanitizer)": [[1, "bleach.sanitizer.ALLOWED_PROTOCOLS"]], "allowed_tags (in module bleach.sanitizer)": [[1, "bleach.sanitizer.ALLOWED_TAGS"]], "bleachsanitizerfilter (class in bleach.sanitizer)": [[1, "bleach.sanitizer.BleachSanitizerFilter"]], "cleaner (class in bleach.sanitizer)": [[1, "bleach.sanitizer.Cleaner"]], "clean() (bleach.sanitizer.cleaner method)": [[1, "bleach.sanitizer.Cleaner.clean"]], "clean() (in module bleach)": [[1, "bleach.clean"]], "default_callbacks (in module bleach.linkifier)": [[5, "bleach.linkifier.DEFAULT_CALLBACKS"]], "linker (class in bleach.linkifier)": [[5, "bleach.linkifier.Linker"]], "linkifyfilter (class in bleach.linkifier)": [[5, "bleach.linkifier.LinkifyFilter"]], "linkify() (bleach.linkifier.linker method)": [[5, "bleach.linkifier.Linker.linkify"]], "linkify() (in module bleach)": [[5, "bleach.linkify"]]}})