am 13bc4ad1: Merge change 24902 into eclair

Merge commit '13bc4ad18bc401c2a80e7dde8cba18841d709a78' into eclair-plus-aosp

* commit '13bc4ad18bc401c2a80e7dde8cba18841d709a78':
  Add "rtsp" to the list of URL schemes that get linkified.
This commit is contained in:
Eric Fischer
2009-09-14 12:02:13 -07:00
committed by Android Git Automerger
2 changed files with 2 additions and 2 deletions

View File

@@ -208,7 +208,7 @@ public class Linkify {
if ((mask & WEB_URLS) != 0) { if ((mask & WEB_URLS) != 0) {
gatherLinks(links, text, Regex.WEB_URL_PATTERN, gatherLinks(links, text, Regex.WEB_URL_PATTERN,
new String[] { "http://", "https://" }, new String[] { "http://", "https://", "rtsp://" },
sUrlMatchFilter, null); sUrlMatchFilter, null);
} }

View File

@@ -65,7 +65,7 @@ public class Regex {
*/ */
public static final Pattern WEB_URL_PATTERN public static final Pattern WEB_URL_PATTERN
= Pattern.compile( = Pattern.compile(
"((?:(http|https|Http|Https):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)" "((?:(http|https|Http|Https|rtsp|Rtsp):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)"
+ "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_" + "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_"
+ "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?" + "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?"
+ "((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+" // named host + "((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+" // named host