misc.search: more safeString
This commit is contained in:
parent
e90a6819a1
commit
a7b68deedd
1 changed files with 3 additions and 3 deletions
|
@ -573,11 +573,11 @@ search.callback = async function (msg, line, args, {results = 2}) {
|
||||||
let out = `__**Results for \`${safeString(query)}\`**__\n`;
|
let out = `__**Results for \`${safeString(query)}\`**__\n`;
|
||||||
for (const result of searchResults) {
|
for (const result of searchResults) {
|
||||||
if (result.special_response) {
|
if (result.special_response) {
|
||||||
out += "> " + parseHtmlEntities(result.special_response.response.split("\n").join("\n> "));
|
out += "> " + safeString(parseHtmlEntities(result.special_response.response.split("\n").join("\n> ")));
|
||||||
out += `\n<${encodeURI(result.special_response.source)}>`;
|
out += `\n<${encodeURI(result.special_response.source)}>`;
|
||||||
} else {
|
} else {
|
||||||
out += `**${parseHtmlEntities(result.title)}** - <${encodeURI(result.url)}>`;
|
out += `**${safeString(parseHtmlEntities(result.title))}** - <${encodeURI(result.url)}>`;
|
||||||
out += `\n> ${parseHtmlEntities(result.description)}`;
|
out += `\n> ${safeString(parseHtmlEntities(result.description))}`;
|
||||||
}
|
}
|
||||||
out += "\n\n";
|
out += "\n\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue