\n",
+ "[youtube]https://www.youtube.com/watch?v=$1[/youtube]");
+ //ftp
+ bbMap.put("([\\S\\s]+?)", "\\[fpt=ftp:$1\\]$2\\[/ftp\\]");
+ //mailto
+ bbMap.put("\n\\s+?
([\\S\\s]+?)", "\\[email\\]$2\\[/email\\]");
+ //links
+ bbMap.put("\n\\s+?
([\\S\\s]+?)", "\\[url=$1\\]$2\\[/url\\]");
+ //smileys
+ for (Map.Entry entry : smileysMap1.entrySet()) {
+ bbMap.put("\n
", entry.getValue().toString());
+ }
+ for (Map.Entry entry : smileysMap2.entrySet()) { //Those that have empty alt tag
+ bbMap.put("\n
", entry.getValue().toString());
+ }
+
+ bbMap.put("\n
"
+ , Matcher.quoteReplacement(":-\\"));
+
+ //html stuff on the end
+ bbMap.put("\n
", "");
+
+ for (Map.Entry entry : bbMap.entrySet()) {
+ html = html.replaceAll(entry.getKey().toString(), entry.getValue().toString());
+ }
+
+ //img need to be done last or it messes up everything else
+ html = html.replaceAll("\\s+