diff options
| author | Fuwn <[email protected]> | 2022-07-17 11:51:34 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-07-17 11:51:34 +0000 |
| commit | 28f5c3ccb58e17f27f0886ef5a8343f117d6516a (patch) | |
| tree | e916e0433707e344df672e69dafdcb25c7c716a2 /src | |
| parent | docs(cargo): bump version 0.1.6 -> 0.2.0 (diff) | |
| download | september-28f5c3ccb58e17f27f0886ef5a8343f117d6516a.tar.xz september-28f5c3ccb58e17f27f0886ef5a8343f117d6516a.zip | |
fix(gemini_to_html.rs): html entity-encode gemini
Diffstat (limited to 'src')
| -rw-r--r-- | src/gemini_to_html.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gemini_to_html.rs b/src/gemini_to_html.rs index 870910b..845c568 100644 --- a/src/gemini_to_html.rs +++ b/src/gemini_to_html.rs @@ -42,8 +42,9 @@ pub fn gemini_to_html( url: &Url, is_proxy: bool, ) -> (String, String) { - let ast_tree = - germ::ast::Ast::from_string(&String::from_utf8_lossy(&response.data)); + let ast_tree = germ::ast::Ast::from_string(&htmlescape::encode_minimal( + &String::from_utf8_lossy(&response.data), + )); let ast = ast_tree.inner(); let mut html = String::new(); let mut title = "".to_string(); |