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 | 2cd604ac50b4e8e437dd61659e42cd732cb3c40d (patch) | |
| tree | 02f2c9f2bcb4f961544df41a53f7d028f1512b30 /src/gemini_to_html.rs | |
| parent | docs(cargo): bump version 0.1.6 -> 0.2.0 (diff) | |
| download | september-0.2.1.tar.xz september-0.2.1.zip | |
fix(gemini_to_html.rs): html entity-encode geminiv0.2.1
Diffstat (limited to 'src/gemini_to_html.rs')
| -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(); |