don't encode HTML entities in translations if they contain links

This commit is contained in:
El RIDO 2019-08-28 20:37:14 +02:00
parent 50881a75e6
commit 813e72d871
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
3 changed files with 6 additions and 7 deletions

View file

@ -566,12 +566,11 @@ jQuery.PrivateBin = (function($, RawDeflate) {
// if $element is given, apply text to element
if ($element !== null) {
// set the last text node of element
let content = $element.contents();
if (content.length > 1) {
$element.html(' ' + output).prepend(content[0]);
} else {
// avoid HTML entity encoding if translation contains link
if (output.indexOf('<a') === -1) {
$element.text(output);
} else {
$element.html(output);
}
}