Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return '';
});
if (text.length == 0)
break;
// Consume leak sequences until string end or an id sequence is encountered
var next = text.indexOf('{{');
while (next > 0) {
var subst = text.substr(0, next);
subst = He.unescape(subst);
elements.push(React.createElement("span", { key: this.key++ }, subst));
text = text.substr(next);
next = text.indexOf('{{');
}
// Return remainder leak sequence
if (len == text.length) {
text = He.unescape(text);
elements.push(React.createElement("span", { key: this.key++ }, text));
break;
}
}
return elements.filter(function (el) { return !!el; });
};
/// MarkedRenderer overrides
while (true) {
var len = text.length;
// Consume elementIds until string end or a leak sequence is encountered
text = text.replace(re, function (match) {
var index = Number(match.match(/\d+/)[0]);
elements.push(_this.elements[index]);
_this.elements[index] = null;
return '';
});
if (text.length == 0)
break;
// Consume leak sequences until string end or an id sequence is encountered
var next = text.indexOf('{{');
while (next > 0) {
var subst = text.substr(0, next);
subst = He.unescape(subst);
elements.push(React.createElement("span", { key: this.key++ }, subst));
text = text.substr(next);
next = text.indexOf('{{');
}
// Return remainder leak sequence
if (len == text.length) {
text = He.unescape(text);
elements.push(React.createElement("span", { key: this.key++ }, text));
break;
}
}
return elements.filter(function (el) { return !!el; });
};
/// MarkedRenderer overrides
highlight: function(code, lang) {
// TODO(philipwalton): come up with a better way to do code marking.
let mark = true;
if (lang.includes(':no-mark')) {
mark = false;
lang = lang.replace(':no-mark', '');
}
code = lang ? hljs.highlight(lang, code).value :
// Since we're not using highlight.js here, we need to
// espace the html, but we have to unescape first in order
// to avoid double escaping.
he.escape(he.unescape(code));
// Allow for highlighting portions of code blocks
// using `**` before and after
if (mark) {
code = code.replace(/\*\*(.+)?\*\*/g, '<mark>$1</mark>');
}
return code;
},
}).use(markdownItAnchor);
json.map(json_item => {
let item = {
id: json_item.id,
categories: json_item.categories,
title: he.unescape(json_item.title.rendered),
body: he.unescape(
json_item.excerpt.rendered.replace(/<\/?[^>]+(>|$)/g, "")
),
img_url: getYoutubeVideoImageURL(json_item.acf.youtube),
video_id: getYoutubeVideoID(json_item.acf.youtube),
audio_link:
config.urls.api.podcast_download +
json_item.id +
"/" +
json_item.slug +
".mp3?ref=appthk"
};
cleanJSON.push(item);
});
return cleanJSON;
function label(i) {
const layer = data.layers[i.toString()];
const label1 = he.unescape((layer && layer.label1) || ' ');
const label2 = layer && layer.label2 && he.unescape(layer.label2);
const color = getLayerFg(i);
const style = layer && { ...layer.style, ...{ color } };
return (
<div style="{style}">
<span>{label1}</span>
{label2 && <span>{label2}</span>}
</div>
);
}
}
res.feedUrls.map(item => {
item.title = he.unescape(item.title)
if (isXML) {
item.url = self.feed_url
}
return item
})
if (res.feedUrls.length === 0) {
feed.posts.map((item) => {
item.favourite = false
item.read = false
item.offline = false
if (item.summary) {
item.summary = he.unescape(item.summary)
}
return item
})
return feed
content.body.replace(/]*(?:name|property)=[']([^']*)['][^>]*\scontent=[']([^']*)['][^>]*>/gmi, function(meta, name, value) {
let name1;
return metas[name1 = changeCase.camelCase(name)] != null ? metas[name1] : metas[name1] = he.unescape(value);
});
content.body.replace(/]*(?:name|property)=["]([^"]*)["][^>]*\scontent=["]([^"]*)["][^>]*>/gmi, function(meta, name, value) {
feed.posts.map((item) => {
item.favourite = false
item.read = false
item.offline = false
item.favicon = null
item.feed_title = feed.meta.title
item.feed_url = feed.meta.xmlurl
item.feed_link = feed.meta.link
if (item.content) {
item.content = he.unescape(item.content)
}
return item
})
return feed
render: function() {
return (
);
},