add: slightly more advanced theming
add: profile "before you view" warning
This commit is contained in:
parent
52ac144953
commit
2ec7e54a8e
20 changed files with 790 additions and 153 deletions
|
@ -2,19 +2,19 @@ use ammonia::Builder;
|
|||
use tetratto_core::model::{auth::UserSettings, communities::CommunityContext};
|
||||
|
||||
/// Escape profile colors
|
||||
// pub fn color_escape(color: &&&String) -> String {
|
||||
// remove_tags(
|
||||
// &color
|
||||
// .replace(";", "")
|
||||
// .replace("<", "<")
|
||||
// .replace(">", "%gt;")
|
||||
// .replace("}", "")
|
||||
// .replace("{", "")
|
||||
// .replace("url(\"", "url(\"/api/v0/util/ext/image?img=")
|
||||
// .replace("url('", "url('/api/v0/util/ext/image?img=")
|
||||
// .replace("url(https://", "url(/api/v0/util/ext/image?img=https://"),
|
||||
// )
|
||||
// }
|
||||
pub fn color_escape(color: &str) -> String {
|
||||
remove_tags(
|
||||
&color
|
||||
.replace(";", "")
|
||||
.replace("<", "<")
|
||||
.replace(">", "%gt;")
|
||||
.replace("}", "")
|
||||
.replace("{", "")
|
||||
.replace("url(\"", "url(\"/api/v0/util/ext/image?img=")
|
||||
.replace("url('", "url('/api/v0/util/ext/image?img=")
|
||||
.replace("url(https://", "url(/api/v0/util/ext/image?img=https://"),
|
||||
)
|
||||
}
|
||||
|
||||
/// Clean profile metadata
|
||||
pub fn remove_tags(input: &str) -> String {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue