We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab21d78 commit b1fe437Copy full SHA for b1fe437
CHANGELOG.md
@@ -1,3 +1,11 @@
1
+## next / unreleased
2
+
3
+* Slightly improve performance.
4
5
+ Assuming elements are more common than comments, make one less method call per node.
6
7
+ *Mike Dalessio*
8
9
## 1.4.1 / 2021-08-18
10
11
* Fix regression in v1.4.0 that did not pass comment nodes to the scrubber.
lib/rails/html/scrubbers.rb
@@ -68,7 +68,7 @@ def scrub(node)
68
end
69
return CONTINUE if skip_node?(node)
70
71
- unless (node.comment? || node.element?) && keep_node?(node)
+ unless (node.element? || node.comment?) && keep_node?(node)
72
return STOP if scrub_node(node) == STOP
73
74
0 commit comments