-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tags in tags #609
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This could be useful to clean nested elements, let's keep it open |
@cgorrieri Did you manage to solve this problem? Given <p>
<p>
Some incorrectly nested text
</p>
</p> I'd love to be able to get <p>
Some incorrectly nested text
</p> After sanitizing the HTML string. |
The proposal is a good one. Not 100% sure about the syntax, I'm curious what @BoDonkey thinks. This isn't a requirement we have in-house so I'll reopen it and tag it contributions welcome. |
In my case I ended up doing a regex before parsing to remove the tags I didn't want nested. |
I like the idea of this new feature. IMO, whoever tackles it will need to be careful with both backward compatibility and not requiring the developer to utilize the feature. So, it should not be a list of defaults and the ability to modify those defaults, as is currently implemented for |
The existing syntax must continue to work, yes. |
The problem to solve
I would like to add a restriction on the content of a tag. For example, only allow BR tags in P or LI elements
Proposed solution
In allow tags, extend the list type of allow tags to a nested list with possible configurations like:
Alternatives
The text was updated successfully, but these errors were encountered: