MCPcopy Create free account
hub / github.com/danmactough/node-feedparser / mayHaveEmbeddedHtml

Function mayHaveEmbeddedHtml

lib/utils.js:342–355  ·  view source on GitHub ↗
(name, el)

Source from the content-addressed store, hash-verified

340}
341
342function mayHaveEmbeddedHtml (name, el) {
343 if (!el || typeof el['#'] !== 'string') return false;
344
345 var type = get(el['@'], 'type');
346
347 if (name === 'content:encoded') return true;
348 if (name === 'description' || name === 'summary' || name === 'tagline') return true;
349
350 if (name === 'content' || name === 'title' || name === 'subtitle' || name === 'rights') {
351 return type === 'html' || type === 'xhtml';
352 }
353
354 return false;
355}
356
357/*
358 * Strip HTML tags, leaving bare text content.

Callers 1

resolveLevelFunction · 0.85

Calls 1

getFunction · 0.70

Tested by

no test coverage detected