Skip to content

Commit

Permalink
Do not rewrite mailto URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fs00 committed Nov 12, 2021
1 parent 4bc9f50 commit 274a885
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/com/gh4a/utils/HtmlUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ private static String rewriteUrlsInAttribute(String attribute, String html, Stri
final StringBuffer sb = new StringBuffer();
while (matcher.find()) {
String url = matcher.group(2);
if (!url.contains("://") && !url.startsWith("#")) {
boolean isAbsoluteUrl = url.contains(":");
boolean isAnchorUrl = url.startsWith("#");
if (!isAbsoluteUrl && !isAnchorUrl) {
if (url.startsWith("/")) {
url = baseUrl + url;
} else {
Expand Down

0 comments on commit 274a885

Please # to comment.