We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c214b28 commit bd5ea3aCopy full SHA for bd5ea3a
lib/rails/html/scrubbers.rb
@@ -209,14 +209,14 @@ def initialize
209
def scrub(node)
210
if Loofah::Elements::LINEBREAKERS.include?(node.name)
211
replacement = if Loofah::Elements::INLINE_LINE_BREAK.include?(node.name)
212
- " "
213
- else
214
- " #{node.content} "
215
- end
+ " "
+ else
+ " #{node.content} "
+ end
216
node.add_next_sibling(Nokogiri::XML::Text.new(replacement, node.document))
217
node.remove
218
elsif node.text?
219
- return CONTINUE
+ CONTINUE
220
else
221
node.before node.children
222
0 commit comments