Whitespace cleanup.

This commit is contained in:
Pistos 2011-11-01 23:35:21 -04:00
parent a61fd16a77
commit e912bf3eda
2 changed files with 6 additions and 6 deletions

View file

@ -19,7 +19,7 @@ module MarkdownifyHelper
render_options[:filter_html] = true
render_options[:hard_wrap] ||= true
# This ugly little hack basically means
# This ugly little hack basically means
# "Give me the rawest contents of target available"
if target.respond_to?(:raw_message)
message = target.raw_message
@ -39,7 +39,7 @@ module MarkdownifyHelper
if target.respond_to?(:format_mentions)
message = target.format_mentions(message)
end
message = Diaspora::Taggable.format_tags(message, :no_escape => true)
return message.html_safe

View file

@ -9,7 +9,7 @@ describe MarkdownifyHelper do
describe "#markdownify" do
describe "not doing something dumb" do
it "strips out script tags" do
markdownify("<script>alert('XSS is evil')</script>").should ==
markdownify("<script>alert('XSS is evil')</script>").should ==
"<p>alert(&#39;XSS is evil&#39;)</p>\n"
end
@ -35,7 +35,7 @@ describe MarkdownifyHelper do
context 'when formatting status messages' do
it "should leave tags intact" do
message = Factory.create(:status_message,
message = Factory.create(:status_message,
:author => alice.person,
:text => "I love #markdown")
formatted = markdownify(message)
@ -43,7 +43,7 @@ describe MarkdownifyHelper do
end
it "should leave mentions intact" do
message = Factory.create(:status_message,
message = Factory.create(:status_message,
:author => alice.person,
:text => "Hey @{Bob; #{bob.diaspora_handle}}!")
formatted = markdownify(message)
@ -52,7 +52,7 @@ describe MarkdownifyHelper do
it "should leave mentions intact for real diaspora handles" do
new_person = Factory(:person, :diaspora_handle => 'maxwell@joindiaspora.com')
message = Factory.create(:status_message,
message = Factory.create(:status_message,
:author => alice.person,
:text => "Hey @{maxwell@joindiaspora.com; #{new_person.diaspora_handle}}!")
formatted = markdownify(message)