Changeset 1551 for trunk/AutoLink
- Timestamp:
- 05/28/09 04:31:50 (6 months ago)
- Location:
- trunk/AutoLink
- Files:
-
- 5 modified
-
AUTOLINK-README.txt (modified) (1 diff)
-
Makefile.PL (modified) (1 diff)
-
plugins/AutoLink/config.yaml (modified) (1 diff)
-
plugins/AutoLink/lib/AutoLink/CMS.pm (modified) (2 diffs)
-
plugins/AutoLink/lib/AutoLink/Plugin.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/AutoLink/AUTOLINK-README.txt
r651 r1551 24 24 INSTALLATION 25 25 26 1. Unpack the ConfigAssistant archive. 27 2. Copy the contents of ConfigAssistant/plugins into /path/to/mt/plugins/ 26 To install this plugin follow the instructions found here: 28 27 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 31 29 32 30 ABOUT AUTOLINK RULES -
trunk/AutoLink/Makefile.PL
r1508 r1551 6 6 WriteMakefile( 7 7 NAME => 'AutoLink', 8 VERSION => '0.9 2',8 VERSION => '0.93', 9 9 DISTNAME => 'AutoLink', 10 10 ); -
trunk/AutoLink/plugins/AutoLink/config.yaml
r1508 r1551 6 6 description: Allows admins to define a list of words and phrases that this plugin will automatically link to designated URLs 7 7 schema_version: 7 8 version: 0.9 29 plugin_link: http://www.majordojo.com/projects/ quicklink.php8 version: 0.93 9 plugin_link: http://www.majordojo.com/projects/movable-type/autolink/ 10 10 11 11 applications: -
trunk/AutoLink/plugins/AutoLink/lib/AutoLink/CMS.pm
r1508 r1551 88 88 89 89 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/; 92 92 $row->{url} = $uri_short; 93 93 } … … 143 143 $param->{case} = $rule->case_insensitive; 144 144 $param->{global} = $rule->global; 145 $param->{destination} = $rule->destination;145 $param->{destination} = MT::Util::encode_html($rule->destination); 146 146 return $app->load_tmpl( 'dialog/create.tmpl', $param ); 147 147 } -
trunk/AutoLink/plugins/AutoLink/lib/AutoLink/Plugin.pm
r1509 r1551 29 29 30 30 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 32 33 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; 34 39 } else { 35 40 $cmd = '$text =~ s!\b('.$pattern.')\b!<a class="autolink" href="'.$href.'">$1</a>!'.$options; … … 100 105 sub quicklink_filter { 101 106 my ($str, $ctx) = @_; 107 return $str if ! defined $ctx; 102 108 require AutoLink::Rule; 103 109 my $blog_id = $ctx->var('blog_id');
