mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-06 02:39:59 +02:00
don't encode HTML entities in translations if they contain links
This commit is contained in:
parent
50881a75e6
commit
813e72d871
3 changed files with 6 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue