Skip to content

Commit 9fcbc42

Browse files
committed
Use gsub instead of delete method to fetch OGP description
1 parent c8de22c commit 9fcbc42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/document.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def title
3333
end
3434

3535
def description
36-
@desc ||= exists? ? self.content.lines.reject{|l| l =~ /^(\n|<)/ }.second.delete('<br>').strip : ''
36+
@desc ||= exists? ? self.content.lines.reject{|l| l =~ /^(\n|<)/ }.second.gsub('<br>', '').strip : ''
3737
end
3838

3939
def content

0 commit comments

Comments
 (0)