Always fix glued URL and target (e.g. for de, ja, nl, zh, zh-TW)

This commit is contained in:
Ilia Rostovtsev
2021-10-05 12:38:23 +03:00
parent d2a78ad151
commit 13e5e83c8d

View File

@@ -807,6 +807,9 @@ sub translated_substitute
# The following should have no spaces, e.g. `<tt>uid=joe,dc=my-domain,dc=com</tt>`
$translated =~ s/(<tt>)(uid[ ]*=.*?)(<\/tt>)/$1@{[&$remove_spaces($2)]}$3/g;
# Always fix glued URL and target (e.g. for de, ja, nl, zh, zh-TW)
$translated =~ s/(href=)(.*?)(\/target=_)/$1$2\/ target=_/g;
# If original string contains ` % ` make sure output also has it
if ($original =~ / % /) {
$translated =~ s/[ ]*%[ ]*/ % /g;