Skip to content

Fixed quote rendering #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions class.groups.plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ public function categoryModel_hasWatched_create(CategoryModel $sender) {
}
}

$metaData= $userMetaModel->getUserMeta(Gdn::session()->UserID, $newCommentKey);
$metaData= $userMetaModel->getUserMeta($userID, $newCommentKey);
foreach ($metaData as $key => $value) {
if($value != null) {
return true;
Expand Down Expand Up @@ -603,8 +603,7 @@ public function discussionModel_beforeRecordAdvancedNotification_handler($sender
}
$data["HeadlineFormat"] = $headline;
// Format to Html
$story = Gdn::formatService()->renderHTML($discussion['Body'], $discussion['Format']);
$message = $story; // htmlspecialchars(Gdn_Format::plainText($story, 'Html'));
$message = Gdn::formatService()->renderQuote($discussion['Body'], $discussion['Format']);
// We just converted it to HTML. Make sure everything downstream knows it.
// Taking this HTML and feeding it into the Rich Format for example, would be invalid.
$data['Format'] = 'Html';
Expand Down Expand Up @@ -660,7 +659,7 @@ public function commentModel_beforeRecordAdvancedNotification($sender, $args){
// $data["HeadlineFormat"] = 'The new discussion has been posted in the category ' . $categoryName . '.';
// Format to Html
$discussionStory = condense(Gdn_Format::to($discussion['Body'], $discussion['Format']));
$commentStory = Gdn::formatService()->renderHTML($comment['Body'],$comment['Format']);
$commentStory = Gdn::formatService()->renderQuote($comment['Body'],$comment['Format']);
// We just converted it to HTML. Make sure everything downstream knows it.
// Taking this HTML and feeding it into the required format for example, would be invalid.
$data['Format'] = 'Html';
Expand Down