mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
VKAPI: Disable HTML output in prior to RAW output
RichText: Replace CR+LN with just LN because it causes graphical bugs in VK4ME
This commit is contained in:
parent
0b63c25d9e
commit
658b60d5f0
2 changed files with 4 additions and 2 deletions
|
@ -50,7 +50,7 @@ final class Wall extends VKAPIRequestHandler
|
||||||
"owner_id" => $post->getTargetWall(),
|
"owner_id" => $post->getTargetWall(),
|
||||||
"date" => $post->getPublicationTime()->timestamp(),
|
"date" => $post->getPublicationTime()->timestamp(),
|
||||||
"post_type" => "post",
|
"post_type" => "post",
|
||||||
"text" => $post->getText(),
|
"text" => $post->getText(false),
|
||||||
"can_edit" => 0, # TODO
|
"can_edit" => 0, # TODO
|
||||||
"can_delete" => $post->canBeDeletedBy($this->getUser()),
|
"can_delete" => $post->canBeDeletedBy($this->getUser()),
|
||||||
"can_pin" => $post->canBePinnedBy($this->getUser()),
|
"can_pin" => $post->canBePinnedBy($this->getUser()),
|
||||||
|
@ -214,7 +214,7 @@ final class Wall extends VKAPIRequestHandler
|
||||||
"owner_id" => $post->getTargetWall(),
|
"owner_id" => $post->getTargetWall(),
|
||||||
"date" => $post->getPublicationTime()->timestamp(),
|
"date" => $post->getPublicationTime()->timestamp(),
|
||||||
"post_type" => "post",
|
"post_type" => "post",
|
||||||
"text" => $post->getText(),
|
"text" => $post->getText(false),
|
||||||
"can_edit" => 0, # TODO
|
"can_edit" => 0, # TODO
|
||||||
"can_delete" => $post->canBeDeletedBy($user),
|
"can_delete" => $post->canBeDeletedBy($user),
|
||||||
"can_pin" => $post->canBePinnedBy($user),
|
"can_pin" => $post->canBePinnedBy($user),
|
||||||
|
|
|
@ -75,6 +75,8 @@ trait TRichText
|
||||||
|
|
||||||
$text = $this->removeZalgo($text);
|
$text = $this->removeZalgo($text);
|
||||||
$text = nl2br($text);
|
$text = nl2br($text);
|
||||||
|
} else {
|
||||||
|
$text = str_replace("\r\n","\n", $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(OPENVK_ROOT_CONF["openvk"]["preferences"]["wall"]["christian"])
|
if(OPENVK_ROOT_CONF["openvk"]["preferences"]["wall"]["christian"])
|
||||||
|
|
Loading…
Reference in a new issue