A simplified scriptlet to remove conditional cap_html_filtering
elements
#3313
-
I think some filters could be simplified to a simple function call in a scriptlet. use:
which would simplify the function:
example for:
instead of:
And maybe consider specific filters like:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Only complicates, HTML filtering doesn't always work. |
Beta Was this translation helpful? Give feedback.
-
HTML filtering is meant to remove DOM elements in the response body, before the browser parses the response. Cosmetic filtering is no different than scriptlet injection in that it works on the live DOM. These two filtering approaches do not do the same thing, they can't be conflated. |
Beta Was this translation helpful? Give feedback.
From your statement it seems that you have misunderstood OP's idea, as OP's scriptlet didn't meant to "drop using :remove() and to use only html filtering", his idea was to combine the both solutions into a single scriptlet, and let the scriptlet to detect and decide which solution to apply to an element.
But like gorhill already mentioned,
html filtering
andjs injecting
are different things: html filtering can't be injected by a +js scriptlet, as html filtering is done on a higher level: before any scriptlets are injected.1) There is also #1507. 2) From your statement it seems that…