Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Feb 12, 2014 @ 14:35
    Dan Diplo
    0

    LinkifiedText doesn't make last URL in a tweet clickable

    Fantastic package! But I think there is an issue with the "linkify" routine so that if a tweet contains a URL as the very last bit of text it won't get converted to an HREF. eg. 

    "Here is some text by @someuser - http://t.co/abcdefghi"

    Then then "http://t.co/abcdefghi" won't turn into a link. I suspect because there's no whitespace after it?

  • Dennis Spijkerboer 53 posts 95 karma points
    Apr 08, 2014 @ 20:19
    Dennis Spijkerboer
    0

    I have the same issue.

    Using uTwit for umbraco 7 (wich is great!!!)

  • Karl Tynan 16 posts 153 karma points MVP 5x c-trib
    Nov 11, 2014 @ 12:28
    Karl Tynan
    0

    I am also seeing this. uTwit for Umbraco v7.1.4

  • Stefan van Leusden 21 posts 73 karma points
    Mar 05, 2015 @ 11:08
    Stefan van Leusden
    0

    I've also noticed this. Umbraco 4.9.1. I'm using: @tweetToDisplay.LinkifiedText, but the last URL is not clickable. 

    Anyone an update on this issue? 


     

  • Craig Richards 17 posts 75 karma points
    Mar 17, 2015 @ 12:04
    Craig Richards
    0

    As a quick fix for uTwit, give this a try :)

    <scripttype="text/javascript">

                $('.text').html(convertToLinks('@tweetToDisplay.LinkifiedText'))

                function convertToLinks(text) {

                    var replaceText, replacePattern1;

     

                    //URLs starting with http://, https://

                    replacePattern1 = /(\b(https?):\/\/[-A-Z0-9+&amp;@@#\/%?=~_|!:,.;]*[-A-Z0-9+&amp;@@#\/%=~_|])/ig;

                    replacedText = text.replace(replacePattern1, '<a class="colored-link-1" title="$1" href="$1" target="_blank">$1</a>');

     

                                    //URLs starting with "www."

                    replacePattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim;

                    replacedText = replacedText.replace(replacePattern2, '$1<a class="colored-link-1" href="http://$2" target="_blank">$2</a>');

     

                                    //returns the text result

     

                    return replacedText;

                    }

            </script> 

Please Sign in or register to post replies

Write your reply to:

Draft