Changeset 16956
- Timestamp:
- 08/01/08 21:04:59 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/mobirc/trunk/lib/App/Mobirc/Plugin/MessageBodyFilter/Clickable.pm
r16926 r16956 17 17 is => 'ro', 18 18 isa => 'Str', 19 ); 20 21 has http_link_target => ( 22 is => 'ro', 23 isa => 'Str', 24 25 default => '_blank', 19 26 ); 20 27 … … 93 100 $out = 94 101 sprintf( 95 '<a href="%s%s" rel="nofollow" class="url" target=" _blank">%s</a>',102 '<a href="%s%s" rel="nofollow" class="url" target="%s">%s</a>', 96 103 encode_entities($self->redirector, q(<>&")), 97 104 $encoded_uri, 105 $self->http_link_target, 98 106 $link_string ); 99 107 } else { 100 $out = qq{<a href="$encoded_uri" rel="nofollow" class="url" target="_blank">$link_string</a>}; 108 $out = 109 sprintf( 110 '<a href="%s" rel="nofollow" class="url" target="%s">%s</a>', 111 $encoded_uri, 112 $self->http_link_target, 113 $link_string ); 101 114 } 115 102 116 if ( $self->au_pcsv ) { 103 $out .= qq{<a href="device:pcsiteviewer?url=$encoded_uri" rel="nofollow" class="au_pcsv" target="_blank">[PCSV]</a>}; 117 $out .= 118 sprintf( 119 '<a href="device:pcsiteviewer?url=%s" rel="nofollow" class="au_pcsv" target="%s">[PCSV]</a>', 120 $encoded_uri, 121 $self->http_link_target ); 104 122 } 123 105 124 if ( $self->pocket_hatena ) { 106 125 $out .= 107 126 sprintf( 108 '<a href="http://mgw.hatena.ne.jp/?url=%s;noimage=0;split=1" rel="nofollow" class="pocket_hatena" target="_blank">[ph]</a>', 109 uri_escape($uri) ); 127 '<a href="http://mgw.hatena.ne.jp/?url=%s;noimage=0;split=1" rel="nofollow" class="pocket_hatena" target="%s">[ph]</a>', 128 uri_escape($uri), 129 $self->http_link_target ); 110 130 } 111 131 if ( $self->google_gwt ) { 112 132 $out .= 113 133 sprintf( 114 '<a href="http://www.google.co.jp/gwt/n?u=%s;_gwt_noimg=0" rel="nofollow" class="google_gwt" target="_blank">[gwt]</a>', 115 uri_escape($uri) ); 134 '<a href="http://www.google.co.jp/gwt/n?u=%s;_gwt_noimg=0" rel="nofollow" class="google_gwt" target="%s">[gwt]</a>', 135 uri_escape($uri), 136 $self->http_link_target ); 116 137 } 117 138 return U $out; … … 126 147 } 127 148 return sprintf( 128 qq{<a href="%s" rel="nofollow" class="url" target=" _blank">%s</a>},149 qq{<a href="%s" rel="nofollow" class="url" target="%s">%s</a>}, 129 150 encode_entities($uri, q(<>&")), 151 $self->http_link_target, 130 152 encode_entities($link_string, q(<>&")), 131 153 );
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)