This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| log "github.com/Sirupsen/logrus" | |
| "io/ioutil" | |
| "net/http" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>test</title> | |
| </head> | |
| <body> | |
| <img src="http://blog-imgs-19.fc2.com/r/i/s/risuco/20090509_003.jpg" onload="console.log('loaded 1')"> | |
| <img src="https://upload.wikimedia.org/wikipedia/ja/archive/4/4b/20100914121956!Wiki-ezorisu3.jpg" onload="console.log('loaded 2')"> | |
| <img src="http://inuneko-sp.gsj.bz/images/special/risubon/02_004_MG_3434.jpg" onload="console.log('loaded 3')"> | |
| <img src="http://www.pref-nagano-hosp.jp/kiso/wp-content/uploads/d7d3388f23579594a4d7ef7aaf0a69e8.jpg" onload="console.log('loaded 4')"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| hoge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package middleware | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| _ "github.com/go-sql-driver/mysql" | |
| "github.com/zenazn/goji/web" | |
| "net/http" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "github.com/zenazn/goji" | |
| "github.com/zenazn/goji/web" | |
| "net/http" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub _decode_args { | |
| my($h, $ie) = @_; | |
| for my $key( keys %{$h} ) { | |
| if ( ref $h->{$key} eq 'ARRAY' ) { | |
| my @values = map { Encode::decode($ie, $_) } @{$h->{$key}}; | |
| $h->{$key} = \@values; | |
| } | |
| elsif(ref $h->{$key} ){ | |
| # do nithing; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -x .git -urN Pickles-origin/lib/Pickles/Plugin/Encode.pm Pickles/lib/Pickles/Plugin/Encode.pm | |
| --- Pickles-origin/lib/Pickles/Plugin/Encode.pm 2011-02-18 18:52:18.000000000 +0900 | |
| +++ Pickles/lib/Pickles/Plugin/Encode.pm 2011-02-18 19:58:34.000000000 +0900 | |
| @@ -19,6 +19,17 @@ | |
| my $ie = $config->{input_encoding} || 'utf-8'; | |
| _decode( $c->req->query_parameters, $ie ); | |
| _decode( $c->req->body_parameters, $ie ); | |
| + for my $key (keys %{$c->args}){ | |
| + if( ref $c->args->{$key} eq 'ARRAY'){ | |
| + my $array = $c->args->{$key}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use warnings; | |
| use strict; | |
| use Test::More; | |
| use Data::Section::Simple; | |
| use Text::Xslate; | |
| my $reader = Data::Section::Simple->new(__PACKAGE__); | |
| my $templates = $reader->get_data_section; | |
| my $tx = Text::Xslate->new( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| </div><!-- /mainContent --> | |
| [% WRAPPER 'footer.inc' INTO footer_content %] | |
| <script> | |
| function myJsRun(){} | |
| myJsRun(); | |
| </script> | |
| [% END %] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #macro.inc | |
| [%- MACRO hoge() BLOCK %] | |
| hoge | |
| [% END %] | |
| #index.tx | |
| Hello Macro [% hoge() %] | |
| # | |
| my $xslate = Text::Xslate->new( |
NewerOlder