metamuffin's personal website


About 1752400482176 milliseconds have passed since midnight of the january the first in 1970.
------------------------------------------------------
}

pub fn horrible_escape_function(text: &str) -> String {
    text.replace("&", "&")
        .replace("<", "&lt;")
        .replace(">", "&gt;")
        .replace("'", "&#8217;")
        .replace("\"", "&quot;")
}



======================================
    Contents of "wellknown.rs"
======================================
use rocket::{
    get,
    http::Header,
    response::{self, Responder},
    serde::json::{json, Value},
    Request,
};

pub struct Cors<T>(pub T);

#[rocket::async_trait]
impl<'r, T: Responder<'r, 'static>> Responder<'r, 'static> for Cors<T> {
    fn respond_to(self, request: &'r Request<'_>) -> response::Result<'static> {
        let mut resp = self.0.respond_to(request);
        if let Ok(resp) = &mut resp {