Changeset 18800 for lang/perl/HTML-MobileJp-Filter
- Timestamp:
- 09/04/08 10:41:06 (5 years ago)
- Location:
- lang/perl/HTML-MobileJp-Filter/trunk/lib/HTML/MobileJp/Filter
- Files:
-
- 5 modified
-
DoCoMoCSS.pm (modified) (2 diffs)
-
DoCoMoGUID.pm (modified) (2 diffs)
-
Dummy.pm (modified) (1 diff)
-
EntityReference.pm (modified) (2 diffs)
-
PictogramFallback.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTML-MobileJp-Filter/trunk/lib/HTML/MobileJp/Filter/DoCoMoCSS.pm
r18789 r18800 20 20 21 21 sub filter { 22 my ($self, $ html) = @_;22 my ($self, $content) = @_; 23 23 24 24 unless ($self->mobile_agent->is_docomo) { … … 28 28 if ($self->config->{xml_declaration_replace}) { 29 29 # instead of $doc->setEncoding etc.. 30 $ html=~ s/.*(<html)/$self->config->{xml_declaration} . "\n$1"/msei;30 $content =~ s/.*(<html)/$self->config->{xml_declaration} . "\n$1"/msei; 31 31 } 32 32 33 33 my $inliner = HTML::DoCoMoCSS->new(base_dir => $self->config->{base_dir}); 34 $ html = $inliner->apply($html);35 $ html = Encode::decode_utf8($html);34 $content = $inliner->apply($content); 35 $content = Encode::decode_utf8($content); 36 36 } 37 37 -
lang/perl/HTML-MobileJp-Filter/trunk/lib/HTML/MobileJp/Filter/DoCoMoGUID.pm
r18789 r18800 7 7 8 8 sub filter { 9 my ($self, $ html) = @_;9 my ($self, $content) = @_; 10 10 11 11 unless ($self->mobile_agent->is_docomo) { … … 13 13 } 14 14 15 HTML::StickyQuery::DoCoMoGUID->new->sticky( scalarref => \$ html);15 HTML::StickyQuery::DoCoMoGUID->new->sticky( scalarref => \$content->stringfy ); 16 16 } 17 17 -
lang/perl/HTML-MobileJp-Filter/trunk/lib/HTML/MobileJp/Filter/Dummy.pm
r15485 r18800 12 12 13 13 sub filter { 14 my ($self, $ html) = @_;14 my ($self, $content) = @_; 15 15 16 16 return join('', 17 17 $self->config->{prefix}, 18 $ html,18 $content->stringfy, 19 19 $self->config->{suffix}, 20 20 ); -
lang/perl/HTML-MobileJp-Filter/trunk/lib/HTML/MobileJp/Filter/EntityReference.pm
r15485 r18800 14 14 15 15 sub filter { 16 my ($self, $ html) = @_;16 my ($self, $content) = @_; 17 17 18 18 if ($self->mobile_agent->is_non_mobile) { 19 19 if ($self->config->{force}) { 20 $ html=~ s{(&\#x([A-Z0-9]+);)}{20 $content =~ s{(&\#x([A-Z0-9]+);)}{ 21 21 my $code = $1; 22 22 my $char = chr hex $2; … … 25 25 } 26 26 } else { 27 $ html= convert_pictogram_entities(27 $content = convert_pictogram_entities( 28 28 mobile_agent => $self->mobile_agent, 29 html => $ html,29 html => $content->stringfy, 30 30 ); 31 31 } 32 32 33 $ html;33 $content; 34 34 } 35 35 -
lang/perl/HTML-MobileJp-Filter/trunk/lib/HTML/MobileJp/Filter/PictogramFallback.pm
r18789 r18800 15 15 16 16 sub filter { 17 my ($self, $ html) = @_;17 my ($self, $content) = @_; 18 18 19 19 unless ($self->mobile_agent->is_non_mobile) { … … 21 21 } 22 22 23 $ html=~ s{(\p{InMobileJPPictograms})}{23 $content =~ s{(\p{InMobileJPPictograms})}{ 24 24 my $char = Encode::JP::Mobile::Character->from_unicode(ord $1); 25 25 my @param; … … 34 34 }ge; 35 35 36 $ html;36 $content; 37 37 } 38 38
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)