mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-26 23:01:27 -04:00
BUGFIX: do not strip spaces from raw_hash of posts
This commit is contained in:
parent
fbbe9f7a19
commit
944cda1f73
2 changed files with 1 additions and 5 deletions
|
@ -115,7 +115,7 @@ class Post < ActiveRecord::Base
|
|||
|
||||
def raw_hash
|
||||
return if raw.blank?
|
||||
Digest::SHA1.hexdigest(raw.gsub(/\s+/, ""))
|
||||
Digest::SHA1.hexdigest(raw)
|
||||
end
|
||||
|
||||
def self.white_listed_image_classes
|
||||
|
|
|
@ -455,10 +455,6 @@ describe Post do
|
|||
post.raw_hash.should_not == post_with_body("something else").raw_hash
|
||||
end
|
||||
|
||||
it "returns the same hash even with different white space" do
|
||||
post.raw_hash.should == post_with_body(" thisis ourt est postbody").raw_hash
|
||||
end
|
||||
|
||||
it "returns a different value with different text case" do
|
||||
post.raw_hash.should_not == post_with_body("THIS is OUR TEST post BODy").raw_hash
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue