How to remove a tag that without some attribute value #589
-
I want to remove tag that don't has specific attribute with value
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You should be able to do this with
Basically, just write a function that returns |
Beta Was this translation helpful? Give feedback.
-
It's called "frame" because there is a stack of tags happening which can be
thought of as nested "frames" internally.
…On Fri, Dec 9, 2022 at 5:23 AM Robert Means ***@***.***> wrote:
Naming things can be hard and if you look at the file, it has been through
the hands of a lot of people. Sometimes consistency gets a little lost.
Maybe there was an example before it using an iframe. You can open a PR
to correct it if you think it would be helpful. Thanks!
—
Reply to this email directly, view it on GitHub
<#589 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27KWYCEOUSA3TZ3SEU3WMMCDLANCNFSM6AAAAAASXW4PGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: <apostrophecms/sanitize-html/repo-discussions/589/comments/4350873@
github.com>
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
Beta Was this translation helpful? Give feedback.
-
(Which is not to say Bob's assessment isn't 100% accurate too, from another
perspective)
…On Tue, Dec 13, 2022 at 10:44 AM Tom Boutell ***@***.***> wrote:
It's called "frame" because there is a stack of tags happening which can
be thought of as nested "frames" internally.
On Fri, Dec 9, 2022 at 5:23 AM Robert Means ***@***.***>
wrote:
> Naming things can be hard and if you look at the file, it has been
> through the hands of a lot of people. Sometimes consistency gets a little
> lost. Maybe there was an example before it using an iframe. You can open
> a PR to correct it if you think it would be helpful. Thanks!
>
> —
> Reply to this email directly, view it on GitHub
> <#589 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAH27KWYCEOUSA3TZ3SEU3WMMCDLANCNFSM6AAAAAASXW4PGI>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: <apostrophecms/sanitize-html/repo-discussions/589/comments/4350873@
> github.com>
>
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
Beta Was this translation helpful? Give feedback.
You should be able to do this with
exclusiveFilter
.Basically, just write a function that returns
true
if the section of HTML should be removed. In the code above, I'm returning true if theattribs
object doesn't have a key that is equal to the attribute that I want present or if that attribute doesn't have a specific value.Hope this helps!