diff --git a/src/main/java/org/jabref/logic/formatter/bibtexfields/HtmlToUnicodeFormatter.java b/src/main/java/org/jabref/logic/formatter/bibtexfields/HtmlToUnicodeFormatter.java index 153ac1cbb0f6..09d8a9b97995 100644 --- a/src/main/java/org/jabref/logic/formatter/bibtexfields/HtmlToUnicodeFormatter.java +++ b/src/main/java/org/jabref/logic/formatter/bibtexfields/HtmlToUnicodeFormatter.java @@ -33,6 +33,6 @@ public String getExampleInput() { @Override public String format(String fieldText) { // StringEscapeUtils converts characters and regex kills tags - return StringEscapeUtils.unescapeHtml4(fieldText).replaceAll("\\<[^>]*>",""); + return StringEscapeUtils.unescapeHtml4(fieldText).replaceAll("<[^>]*>",""); } } diff --git a/src/main/java/org/jabref/logic/layout/format/HTMLChars.java b/src/main/java/org/jabref/logic/layout/format/HTMLChars.java index 5a7138340966..d648583d8004 100644 --- a/src/main/java/org/jabref/logic/layout/format/HTMLChars.java +++ b/src/main/java/org/jabref/logic/layout/format/HTMLChars.java @@ -20,7 +20,7 @@ public String format(String inField) { .replaceAll("[\\n]{2,}", "
") // Replace double line breaks with
.replace("\n", "
") // Replace single line breaks with
.replace("\\$", "$") // Replace \$ with $
- .replaceAll("\\$([^\\$]*)\\$", "\\{$1\\}"); // Replace $...$ with {...} to simplify conversion
+ .replaceAll("\\$([^$]*)\\$", "\\{$1\\}"); // Replace $...$ with {...} to simplify conversion
StringBuilder sb = new StringBuilder();
StringBuilder currentCommand = null;
diff --git a/src/main/java/org/jabref/logic/openoffice/OOPreFormatter.java b/src/main/java/org/jabref/logic/openoffice/OOPreFormatter.java
index 1e7fc1076e65..91e954dd44b4 100644
--- a/src/main/java/org/jabref/logic/openoffice/OOPreFormatter.java
+++ b/src/main/java/org/jabref/logic/openoffice/OOPreFormatter.java
@@ -19,7 +19,7 @@ public String format(String field) {
int i;
String finalResult = field.replaceAll("&|\\\\&", "&") // Replace & and \& with &
.replace("\\$", "$") // Replace \$ with $
- .replaceAll("\\$([^\\$]*)\\$", "\\{$1\\}"); // Replace $...$ with {...} to simplify conversion
+ .replaceAll("\\$([^$]*)\\$", "\\{$1\\}"); // Replace $...$ with {...} to simplify conversion
StringBuilder sb = new StringBuilder();
StringBuilder currentCommand = null;