aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/replacement/youtube
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2014-05-09 12:40:16 +0300
committerDamian Minkov <damencho@jitsi.org>2014-05-09 12:44:05 +0300
commitf14f2e248a73011901d7fb439975f80b1f826cdf (patch)
tree7c0ab8b50584f5df9796aec675d49a33ef13302d /src/net/java/sip/communicator/impl/replacement/youtube
parentb2d44ec255747e377283e97188aa102539d2b3d6 (diff)
downloadjitsi-f14f2e248a73011901d7fb439975f80b1f826cdf.zip
jitsi-f14f2e248a73011901d7fb439975f80b1f826cdf.tar.gz
jitsi-f14f2e248a73011901d7fb439975f80b1f826cdf.tar.bz2
Do replacements only inside plaintext nodes or on link content, avoid replacing text in already replaced one. Fixes some replacement services.
Diffstat (limited to 'src/net/java/sip/communicator/impl/replacement/youtube')
-rw-r--r--src/net/java/sip/communicator/impl/replacement/youtube/ReplacementServiceYoutubeImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/replacement/youtube/ReplacementServiceYoutubeImpl.java b/src/net/java/sip/communicator/impl/replacement/youtube/ReplacementServiceYoutubeImpl.java
index 2fdf8ef..1e45a9e 100644
--- a/src/net/java/sip/communicator/impl/replacement/youtube/ReplacementServiceYoutubeImpl.java
+++ b/src/net/java/sip/communicator/impl/replacement/youtube/ReplacementServiceYoutubeImpl.java
@@ -29,8 +29,8 @@ public class ReplacementServiceYoutubeImpl
* The regex used to match the link in the message.
*/
public static final String YOUTUBE_PATTERN =
- "(?<=>)(https?\\:\\/\\/(www\\.)*?youtube\\.com"
- + "\\/watch\\?v=([a-zA-Z0-9_\\-]+))([?&]\\w+=[\\w-]+)*(?=</A>)";
+ "(https?\\:\\/\\/(www\\.)*?youtube\\.com"
+ + "\\/watch\\?v=([a-zA-Z0-9_\\-]+))([?&]\\w+=[\\w-]+)*";
/**
* Configuration label shown in the config form.