Skip to content

Commit

Permalink
Add ALLOWED_URL_SCHEMES constant (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymctim authored Sep 22, 2024
1 parent 2f7f481 commit 98ca727
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nh3.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ from typing import Callable, Dict, Optional, Set

ALLOWED_TAGS: Set[str]
ALLOWED_ATTRIBUTES: Dict[str, Set[str]]
ALLOWED_URL_SCHEMES: Set[str]

def clean(
html: str,
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,6 @@ fn nh3(_py: Python, m: &Bound<PyModule>) -> PyResult<()> {
let a = ammonia::Builder::default();
m.add("ALLOWED_TAGS", a.clone_tags())?;
m.add("ALLOWED_ATTRIBUTES", a.clone_tag_attributes())?;
m.add("ALLOWED_URL_SCHEMES", a.clone_url_schemes())?;
Ok(())
}

0 comments on commit 98ca727

Please sign in to comment.