diff options
Diffstat (limited to 'lib/Apache/Inject')
-rw-r--r-- | lib/Apache/Inject/Handler.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Apache/Inject/Handler.pm b/lib/Apache/Inject/Handler.pm index 0e054e7..ae81fbb 100644 --- a/lib/Apache/Inject/Handler.pm +++ b/lib/Apache/Inject/Handler.pm @@ -12,8 +12,11 @@ use Apache2::RequestUtil (); my $doc = qr{ \A (?<head> \s* + ( <!-- .*? --> )? \s* ( <!doctype[^>]*> )? \s* + ( <!-- .*? --> )? \s* ( <html[^>]*> )? \s* + ( <!-- .*? --> )? \s* ( <head[^>]*> .*? </head> \s* | ( <meta[^>]*> \s* | <link[^>]*> \s* @@ -21,12 +24,16 @@ my $doc = qr{ | <style[^>]*> .*? </style> \s* | <script[^>]*> .*? </script> \s* | <base[^>]*> \s* + | <!-- .*? --> \s* )+ )? - (<body[^>]*>)? + ( <!-- .*? --> )? \s* + ( <body[^>]*> )? \s* )? (?<body> .*? ) - (?<rest> </html> \s* )? + (?<rest> </html> \s* + ( <!-- .*? --> )? \s* + )? \z }xmsi; |