diff options
Diffstat (limited to 'htmlua-apache-cgi')
| -rw-r--r-- | htmlua-apache-cgi/src/main.rs | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/htmlua-apache-cgi/src/main.rs b/htmlua-apache-cgi/src/main.rs index ce86dc6..ab91cb1 100644 --- a/htmlua-apache-cgi/src/main.rs +++ b/htmlua-apache-cgi/src/main.rs @@ -1,32 +1,11 @@ -use std::env; -use std::fs; -use std::fs::read_to_string; -use std::path::{Path, PathBuf}; -use std::str::FromStr; use htmlua_parser::serve::serve_content; -use kuchikiki::{ - NodeRef, - traits::TendrilSink, -}; +use std::env; fn main() { println!("Content-Type: text/html\n"); let request_uri = env::var("PATH_INFO").unwrap_or_else(|_| "".to_string()); - let page = serve_content(request_uri.as_str()).unwrap(); - - // Output the final expanded HTML println!("{page}"); } - -// Simple HTML escape function -fn html_escape(input: &str) -> String { - input - .replace('&', "&") - .replace('<', "<") - .replace('>', ">") - .replace('"', """) - .replace('\'', "'") -} |
