You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently no good way to cleanly split the content of a TextNode into serveral nodes after parsing. Doing so is vital when dealing with smileys and/or standalone links as they are likely to clash when it comes to processing them through dedicated filters. and masking them later through the HTMLSafeVisitor. A rather pain-free approach would be to allow TextNodes themselves have children, which would involve:
moving the appropriate logic out of ElementNode into Node;
allow TextNodes to be split at arbitrary positions through a public method (e.g.: TextNode.insertNodeAt(int $position, Node $node[, int $length=1])
A welcome side-effect were that DocumentNode could extend either TextNode or even Node directly instead of being a descendant of ElementNode.
The text was updated successfully, but these errors were encountered:
This could possibly address #4 and help with #9:
There is currently no good way to cleanly split the content of a
TextNode
into serveral nodes after parsing. Doing so is vital when dealing with smileys and/or standalone links as they are likely to clash when it comes to processing them through dedicated filters. and masking them later through theHTMLSafeVisitor
. A rather pain-free approach would be to allowTextNode
s themselves have children, which would involve:ElementNode
intoNode
;TextNode
s to be split at arbitrary positions through a public method (e.g.:TextNode.insertNodeAt(int $position, Node $node[, int $length=1]
)A welcome side-effect were that
DocumentNode
could extend eitherTextNode
or evenNode
directly instead of being a descendant ofElementNode
.The text was updated successfully, but these errors were encountered: