mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Merge pull request #4835 from bhkjersten/5111-html-clean
5111 Clean up HTML output
This commit is contained in:
commit
f2386c8a88
@ -34,6 +34,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.coreutils.EscapeUtil;
|
||||
import org.sleuthkit.autopsy.texttranslation.TextTranslator;
|
||||
import org.sleuthkit.autopsy.texttranslation.TranslationException;
|
||||
|
||||
@ -103,6 +104,10 @@ public final class GoogleTranslator implements TextTranslator {
|
||||
|
||||
// put back the newlines
|
||||
translatedString = translatedString.replaceAll("<br />", "\n");
|
||||
|
||||
// With our current settings, Google Translate outputs HTML
|
||||
// so we need to undo the escape characters.
|
||||
translatedString = EscapeUtil.unEscapeHtml(translatedString);
|
||||
return translatedString;
|
||||
} catch (Throwable ex) {
|
||||
//Catching throwables because some of this Google Translate code throws throwables
|
||||
|
Loading…
x
Reference in New Issue
Block a user