aboutsummaryrefslogtreecommitdiff
path: root/htmlua-apache-cgi
diff options
context:
space:
mode:
authorgyoder <70408179+gyoder@users.noreply.github.com>2025-07-05 16:17:58 -0600
committergyoder <70408179+gyoder@users.noreply.github.com>2025-07-05 16:17:58 -0600
commit88b22b4e774c00344f8dad2d9eda6e1ff0491a6e (patch)
treec1df07764dc5238dbbb25ae4f5af537f68a2294b /htmlua-apache-cgi
parent010bb99c9bda53ab458cee39cce802f6588ea0b4 (diff)
cleaned up
Diffstat (limited to 'htmlua-apache-cgi')
-rw-r--r--htmlua-apache-cgi/src/main.rs23
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('&', "&amp;")
- .replace('<', "&lt;")
- .replace('>', "&gt;")
- .replace('"', "&quot;")
- .replace('\'', "&#x27;")
-}