add all whitespaces in regex

M. Dietrich created

Change summary

src/eu/siacs/conversations/utils/UIHelper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

src/eu/siacs/conversations/utils/UIHelper.java 🔗

@@ -561,7 +561,7 @@ public class UIHelper {
 				{"\\^\\^", " 😁 ", },
 			}) {
 				String p = r[0];
-				p = "(^" + p + "$|^" + p + " +| +" + p + " +| +" + p + "$)";
+				p = "(^" + p + "$|^" + p + "\\s+|\\s+" + p + "\\s+|\\s+" + p + "$)";
 				body = body.replaceAll(p, r[1]);
 			}
 			body = body.trim();