Skip to content

Commit 2b5d05c

Browse files
committed
ShareInto: Strip common tracking parameters, by @gsantner, closes #1490
1 parent d4d8f41 commit 2b5d05c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/src/main/java/net/gsantner/markor/activity/DocumentShareIntoFragment.java

+2
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,8 @@ private static String formatLink(String text, String link) {
406406
text = "";
407407
}
408408

409+
link = link.replaceAll("(?m)(?<=&|\\?)(utm_|source|__mk_|ref|sprefix|crid|partner|promo).*?(&|$|\\s|\\))", "");
410+
409411
formattedLink = String.format("[%s](%s )",
410412
text.trim().replace("[", "\\[").replace("]", "\\]"),
411413
link.trim().replace("(", "\\(").replace(")", "\\)")

0 commit comments

Comments
 (0)