[tor-commits] [metrics-web/master] Remove redundant escape in regular expression.
karsten at torproject.org
karsten at torproject.org
Mon Aug 27 12:35:18 UTC 2018
commit ab164e7a4b5228d9b7dc53d72f36d9ab070bf934
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Mon Aug 20 20:50:53 2018 +0200
Remove redundant escape in regular expression.
---
src/main/java/org/torproject/metrics/web/UpdateNews.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/torproject/metrics/web/UpdateNews.java b/src/main/java/org/torproject/metrics/web/UpdateNews.java
index 4de7952..2865516 100644
--- a/src/main/java/org/torproject/metrics/web/UpdateNews.java
+++ b/src/main/java/org/torproject/metrics/web/UpdateNews.java
@@ -99,7 +99,7 @@ public class UpdateNews {
.replaceAll("“", "“")
.replaceAll("”", "”");
String shortDesc = desc
- .replaceAll("\\<.*?\\>", "")
+ .replaceAll("<.*?>", "")
.replaceAll("&.*;", "");
if (shortDesc.contains(". ")) {
shortDesc = shortDesc.substring(0, shortDesc.indexOf(". "));
More information about the tor-commits
mailing list