Unverified Commit 18dbf021 authored by SaiVardhan's avatar SaiVardhan Committed by Jonne Haß

[FIX] #6642 Strip Markdown from conversation title

closes #6642
parent 5f3e4fc3
......@@ -138,6 +138,7 @@ before.
* Do not allow to change email to an already used one [#6905](https://github.com/diaspora/diaspora/pull/6905)
* Correctly filter mentions on the server side [#6902](https://github.com/diaspora/diaspora/pull/6902)
* Add aspects to the aspect membership dropdown when creating them on the getting started page [#6864](https://github.com/diaspora/diaspora/pull/6864)
* Strip markdown from message preview in conversations list [#6923](https://github.com/diaspora/diaspora/pull/6923)
## Features
* Support color themes [#6033](https://github.com/diaspora/diaspora/pull/6033)
......
......@@ -32,7 +32,7 @@
.last_message
- if conversation.messages.present?
%em
= conversation.messages.last.text
= conversation.messages.last.message.plain_text_without_markdown
- if other_participants.count > 1
.participants
- other_participants.drop(1).take(15).each do |participant|
......
......@@ -64,7 +64,7 @@ describe ConversationsController, :type => :controller do
author: alice.person,
participant_ids: [alice.contacts.first.person.id, alice.person.id],
subject: "not spam",
messages_attributes: [{author: alice.person, text: "cool stuff"}]
messages_attributes: [{author: alice.person, text: "**cool stuff**"}]
}
@conversations = Array.new(3) { Conversation.create(hash) }
@visibilities = @conversations.map {|conversation|
......@@ -102,6 +102,14 @@ describe ConversationsController, :type => :controller do
get :index, conversation_id: @conversations.first.id
expect(assigns[:conversation]).to be_nil
end
it "retrieves a conversation message with out markdown content " do
get :index
@conversation = @conversations.first
expect(response).to be_success
expect(response.body).to match(/cool stuff/)
expect(response.body).not_to match(%r{<strong>cool stuff</strong>})
end
end
describe '#create' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment