public function stripTags()
{
if (isset($this->rules['strip']) && is_array($this->rules['strip'])) {
foreach ($this->rules['strip'] as $pattern) {
$nodes = $this->xpath->query($pattern);
if ($nodes !== false && $nodes->length > 0) {
foreach ($nodes as $node) {
$node->parentNode->removeChild($node);
}
}
}
}
}