Skip to content

Commit d9f3238

Browse files
committed
Compatibility with Laravel 5.2
1 parent c94e8e7 commit d9f3238

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@
2828
"optimize-autoloader": true,
2929
"preferred-install": "dist"
3030
},
31-
"minimum-stability": "dev",
3231
"license": "MIT"
3332
}

src/Middleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Component\HttpFoundation\Response;
77
use Symfony\Component\HttpFoundation\StreamedResponse;
88

9-
class Middleware implements \Illuminate\Contracts\Routing\Middleware
9+
class Middleware
1010
{
1111
/**
1212
* Handle an incoming request.
@@ -20,7 +20,7 @@ public function handle($request, \Closure $next)
2020
$response = $next($request);
2121

2222
// Check PHP extension
23-
if( ! extension_loaded('tidy') or ! config('tidy.enabled'))
23+
if( ! extension_loaded('tidy') or ! config('tidy.enabled', true))
2424
return $response;
2525

2626
// Skip special response types
@@ -31,7 +31,7 @@ public function handle($request, \Closure $next)
3131
return $response;
3232

3333
// Check request
34-
if($request->ajax() and ! config('tidy.ajax'))
34+
if($request->ajax() and ! config('tidy.ajax', false))
3535
return $response;
3636

3737
// Convert unknown responses

src/config.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,18 @@
5252
// Errors that match these regexs wont be displayed
5353
'ignored_errors' => [
5454
// workaround to hide errors related to HTML5
55-
"/line.*proprietary attribute \"data-.*\n?/",
56-
"/line.*proprietary attribute \"placeholder.*\n?/",
57-
"/line.*is not approved by W3C\n?/",
5855
"/line.*<html> proprietary attribute \"class\"\n?/",
59-
"/line.*<meta> proprietary attribute \"charset\"\n?/",
60-
"/line.*<meta> lacks \"content\" attribute\n?/",
61-
"/line.*<table> lacks \"summary\" attribute\n?/",
62-
"/line.*<style> inserting \"type\" attribute\n?/",
63-
"/line.*<script> inserting \"type\" attribute\n?/",
6456
"/line.*<input> proprietary attribute \"autocomplete\"\n?/",
6557
"/line.*<input> proprietary attribute \"autofocus\"\n?/",
58+
"/line.*<meta> lacks \"content\" attribute\n?/",
59+
"/line.*<meta> proprietary attribute \"charset\"\n?/",
60+
"/line.*<script> inserting \"type\" attribute\n?/",
61+
"/line.*<style> inserting \"type\" attribute\n?/",
62+
"/line.*<table> lacks \"summary\" attribute\n?/",
63+
"/line.*is not approved by W3C\n?/",
64+
"/line.*proprietary attribute \"data-.*\n?/",
65+
"/line.*proprietary attribute \"placeholder.*\n?/",
66+
"/line.*proprietary attribute \"contenteditable.*\n?/",
6667
],
6768

6869
];

0 commit comments

Comments
 (0)