Replies: 2 comments
-
hm they seem like handy functions, although I happen to never have needed them. The implementation of that first PR for
i.e. "anything with a tag is html". I can imagine that there will be a lot of edge cases since strictly speaking you have to abide by the whole HTML spec in order to judge it is valid. |
Beta Was this translation helpful? Give feedback.
-
I didn't want to add an strict validation of HTML ( Using |
Beta Was this translation helpful? Give feedback.
-
Something like
str($string)->isHtml()
can be useful. This can be implemented in bothStr
(as an static method) andStringable
classes just usingstrip_tags
to avoid new dependencies.This method implementation was rejected twice before:
But I'm asking again because methods like
isJson()
have been implemented. I can send a PR with tests if you want, but don't want it to be rejected if you do not agree...Beta Was this translation helpful? Give feedback.
All reactions