diff options
author | Damian Minkov <damencho@jitsi.org> | 2014-05-09 12:40:16 +0300 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2014-05-09 12:44:05 +0300 |
commit | f14f2e248a73011901d7fb439975f80b1f826cdf (patch) | |
tree | 7c0ab8b50584f5df9796aec675d49a33ef13302d /src/net/java/sip/communicator/impl/replacement/bliptv/ReplacementServiceBliptvImpl.java | |
parent | b2d44ec255747e377283e97188aa102539d2b3d6 (diff) | |
download | jitsi-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/bliptv/ReplacementServiceBliptvImpl.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/replacement/bliptv/ReplacementServiceBliptvImpl.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/impl/replacement/bliptv/ReplacementServiceBliptvImpl.java b/src/net/java/sip/communicator/impl/replacement/bliptv/ReplacementServiceBliptvImpl.java index 40658ce..43ffdd7 100644 --- a/src/net/java/sip/communicator/impl/replacement/bliptv/ReplacementServiceBliptvImpl.java +++ b/src/net/java/sip/communicator/impl/replacement/bliptv/ReplacementServiceBliptvImpl.java @@ -32,8 +32,7 @@ public class ReplacementServiceBliptvImpl * The regex used to match the link in the message. */ public static final String BLIPTV_PATTERN = - "(?<=>)(http:\\/\\/(?:www\\.)?blip\\.tv" - + "\\/file\\/(\\d+)([?&\\?]\\w+=[\\w-]+)*)(?=</A>)"; + "(http:\\/\\/(?:www\\.)?blip\\.tv\\/.*)"; /** * Configuration label shown in the config form. @@ -64,7 +63,8 @@ public class ReplacementServiceBliptvImpl { try { - String url = "http://oohembed.com/oohembed/?url=" + sourceString; + String url = "http://api.embed.ly/1/oembed?url=" + sourceString + + "&key=cff57b37766440a6a8aa45df88097efe"; URL sourceURL = new URL(url); URLConnection conn = sourceURL.openConnection(); |