forked from mirrors/relay
Allow rel attribute in local & footer blurb
Patch from Jaehong Kang <sinoru@me.com>
This commit is contained in:
parent
7a00229508
commit
9779518dc1
1 changed files with 18 additions and 2 deletions
|
@ -291,7 +291,15 @@ impl Config {
|
|||
pub(crate) fn footer_blurb(&self) -> Option<crate::templates::Html<String>> {
|
||||
if let Some(blurb) = &self.footer_blurb {
|
||||
if !blurb.is_empty() {
|
||||
return Some(crate::templates::Html(ammonia::clean(blurb)));
|
||||
return Some(crate::templates::Html(
|
||||
ammonia::Builder::new()
|
||||
.add_tag_attributes("a", &["rel"])
|
||||
.add_tag_attributes("area", &["rel"])
|
||||
.add_tag_attributes("link", &["rel"])
|
||||
.link_rel(None)
|
||||
.clean(blurb)
|
||||
.to_string()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,7 +309,15 @@ impl Config {
|
|||
pub(crate) fn local_blurb(&self) -> Option<crate::templates::Html<String>> {
|
||||
if let Some(blurb) = &self.local_blurb {
|
||||
if !blurb.is_empty() {
|
||||
return Some(crate::templates::Html(ammonia::clean(blurb)));
|
||||
return Some(crate::templates::Html(
|
||||
ammonia::Builder::new()
|
||||
.add_tag_attributes("a", &["rel"])
|
||||
.add_tag_attributes("area", &["rel"])
|
||||
.add_tag_attributes("link", &["rel"])
|
||||
.link_rel(None)
|
||||
.clean(blurb)
|
||||
.to_string()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue