mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-25 21:11:01 +00:00
Percent-encode Post slug on sending Activity to other instances
This commit is contained in:
parent
eedd5fe4e9
commit
0fbefe2cdc
1 changed files with 7 additions and 2 deletions
|
@ -17,7 +17,7 @@ use plume_common::{
|
|||
inbox::{AsActor, AsObject, FromId},
|
||||
Hashtag, Id, IntoId, Licensed, Source, PUBLIC_VISIBILITY,
|
||||
},
|
||||
utils::md_to_html,
|
||||
utils::{iri_percent_encode_seg, md_to_html},
|
||||
};
|
||||
use riker::actors::{Publish, Tell};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
@ -249,7 +249,12 @@ impl Post {
|
|||
}
|
||||
|
||||
pub fn ap_url(blog: Blog, slug: &str) -> String {
|
||||
ap_url(&format!("{}/~/{}/{}/", CONFIG.base_url, blog.fqn, slug))
|
||||
ap_url(&format!(
|
||||
"{}/~/{}/{}/",
|
||||
CONFIG.base_url,
|
||||
blog.fqn,
|
||||
iri_percent_encode_seg(slug)
|
||||
))
|
||||
}
|
||||
|
||||
// It's better to calc slug in insert and update
|
||||
|
|
Loading…
Reference in a new issue