htmlentities encode/decode

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/255/head
Maxence Lange 2018-12-20 23:59:38 -01:00
rodzic d334d117f7
commit 7ba6beb745
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -468,6 +468,7 @@ class ACore extends Item implements JsonSerializable {
case self::AS_STRING:
$value = strip_tags($value);
$value = html_entity_decode($value, ENT_QUOTES);
return $value;

Wyświetl plik

@ -85,9 +85,9 @@ class PostService {
public function createPost(Post $post, ACore &$activity = null): string {
$note =
$this->noteService->generateNote(
$post->getUserId(), $post->getContent(), $post->getType()
$post->getUserId(), htmlentities($post->getContent(), ENT_QUOTES), $post->getType()
);
$this->noteService->replyTo($note, $post->getReplyTo());
$this->noteService->addRecipients($note, $post->getType(), $post->getTo());