MCPcopy Index your code
hub / github.com/textAngular/textAngular / parseStartTag

Function parseStartTag

src/textAngular-sanitize.js:380–409  ·  view source on GitHub ↗
(tag, tagName, rest, unary)

Source from the content-addressed store, hash-verified

378 parseEndTag();
379
380 function parseStartTag(tag, tagName, rest, unary) {
381 tagName = angular.lowercase(tagName);
382 if (blockElements[ tagName ]) {
383 while (stack.last() && inlineElements[ stack.last() ]) {
384 parseEndTag("", stack.last());
385 }
386 }
387
388 if (optionalEndTagElements[ tagName ] && stack.last() == tagName) {
389 parseEndTag("", tagName);
390 }
391
392 unary = voidElements[ tagName ] || !!unary;
393
394 if (!unary)
395 stack.push(tagName);
396
397 var attrs = {};
398
399 rest.replace(ATTR_REGEXP,
400 function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {
401 var value = doubleQuotedValue
402 || singleQuotedValue
403 || unquotedValue
404 || '';
405
406 attrs[name] = decodeEntities(value);
407 });
408 if (handler.start) handler.start(tagName, attrs, unary);
409 }
410
411 function parseEndTag(tag, tagName) {
412 var pos = 0, i;

Callers

nothing calls this directly

Calls 2

parseEndTagFunction · 0.85
decodeEntitiesFunction · 0.85

Tested by

no test coverage detected