Changeset 1551 for trunk/AutoLink

Show
Ignore:
Timestamp:
05/28/09 04:31:50 (6 months ago)
Author:
breese
Message:

updated readme

Location:
trunk/AutoLink
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/AutoLink/AUTOLINK-README.txt

    r651 r1551  
    2424INSTALLATION 
    2525 
    26   1. Unpack the ConfigAssistant archive. 
    27   2. Copy the contents of ConfigAssistant/plugins into /path/to/mt/plugins/ 
     26To install this plugin follow the instructions found here: 
    2827 
    29 You will know if AutoLink is installed properly if you can see AutoLink  
    30 listed under your list of Active Plugins. 
     28    http://tinyurl.com/easy-plugin-install 
    3129 
    3230ABOUT AUTOLINK RULES 
  • trunk/AutoLink/Makefile.PL

    r1508 r1551  
    66WriteMakefile( 
    77    NAME            => 'AutoLink', 
    8     VERSION         => '0.92', 
     8    VERSION         => '0.93', 
    99    DISTNAME        => 'AutoLink', 
    1010); 
  • trunk/AutoLink/plugins/AutoLink/config.yaml

    r1508 r1551  
    66description: Allows admins to define a list of words and phrases that this plugin will automatically link to designated URLs 
    77schema_version: 7 
    8 version: 0.92 
    9 plugin_link: http://www.majordojo.com/projects/quicklink.php 
     8version: 0.93 
     9plugin_link: http://www.majordojo.com/projects/movable-type/autolink/ 
    1010 
    1111applications: 
  • trunk/AutoLink/plugins/AutoLink/lib/AutoLink/CMS.pm

    r1508 r1551  
    8888 
    8989        my $uri_short = $rule->destination; 
    90         if (length($uri_short) > 50) { 
    91             $uri_short =~ s/.*(.{50})$/\1/; 
     90        if (length($uri_short) > 64) { 
     91            $uri_short =~ s/.*(.{64})$/\1/; 
    9292            $row->{url} = $uri_short; 
    9393        } 
     
    143143    $param->{case}         = $rule->case_insensitive; 
    144144    $param->{global}       = $rule->global; 
    145     $param->{destination}  = $rule->destination; 
     145    $param->{destination}  = MT::Util::encode_html($rule->destination); 
    146146    return $app->load_tmpl( 'dialog/create.tmpl', $param ); 
    147147} 
  • trunk/AutoLink/plugins/AutoLink/lib/AutoLink/Plugin.pm

    r1509 r1551  
    2929 
    3030        my $cmd = ""; 
    31         # TODO - the text that is linked to needs to be tokenized and links added at the end 
     31        # TODO - the text that is linked to needs to be tokenized and links  
     32        # added at the end 
    3233        if ($rule->regex) { 
    33           $cmd = '$text =~ s!('.$pattern.')!<a class="autolink" href="'.$href.'">$1</a>!'.$options; 
     34            s/!/\\!/ for $pattern, $options; # this is to avoid security 
     35                                             # hole with somebody running '!'  
     36                                             # through eval; 
     37#           $cmd = '$text =~ s!'.$pattern.'!'.$href.'!'.$options; 
     38            $cmd = '$text =~ s!('.$pattern.')!<a class="autolink" href="'.$href.'">$1</a>!'.$options; 
    3439        } else { 
    3540          $cmd = '$text =~ s!\b('.$pattern.')\b!<a class="autolink" href="'.$href.'">$1</a>!'.$options; 
     
    100105sub quicklink_filter { 
    101106    my ($str, $ctx) = @_; 
     107    return $str if ! defined $ctx; 
    102108    require AutoLink::Rule; 
    103109    my $blog_id = $ctx->var('blog_id');