You are here

protected function DOMTreeBuilder::normalizeTagName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php \Masterminds\HTML5\Parser\DOMTreeBuilder::normalizeTagName()

Apply normalization rules to a tag name.

See sections 2.9 and 8.1.2.

Parameters

string $name: The tag name.

Return value

string The normalized tag name.

2 calls to DOMTreeBuilder::normalizeTagName()
DOMTreeBuilder::endTag in vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php
An end-tag.
DOMTreeBuilder::startTag in vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php
Process the start tag.

File

vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php, line 626

Class

DOMTreeBuilder
Create an HTML5 DOM tree from events.

Namespace

Masterminds\HTML5\Parser

Code

protected function normalizeTagName($name) {

  /*
   * Section 2.9 suggests that we should not do this. if (strpos($name, ':') !== false) { // We know from the grammar that there must be at least one other // char besides :, since : is not a legal tag start. $parts = explode(':', $name); return array_pop($parts); }
   */
  return $name;
}