Feature Description
Create a stripTags method to remove all HTML and PHP tags from a string. Support specifying allowed tags (as in PHP's strip_tags).
Use Case
Sanitizing user input for display, emails, logs, or before further string transformations—avoiding XSS and rendering issues.
Static Usage
$clean = SM::stripTags('<p>Paragraph</p><b>Bold</b>');
// Output: 'ParagraphBold'
Fluent Usage
$clean = SM::make('<p>Welcome</p><a href="#">here</a>')->stripTags('<a>');
// Output: 'Welcomehere'
Checklist
Feature Description
Create a
stripTagsmethod to remove all HTML and PHP tags from a string. Support specifying allowed tags (as in PHP'sstrip_tags).Use Case
Sanitizing user input for display, emails, logs, or before further string transformations—avoiding XSS and rendering issues.
Static Usage
Fluent Usage
Checklist