]> BookStack Code Mirror - bookstack/commitdiff
Prevented custom HTML being inserted on settings page
authorDan Brown <redacted>
Sat, 25 Feb 2017 12:41:32 +0000 (12:41 +0000)
committerDan Brown <redacted>
Sat, 25 Feb 2017 12:41:32 +0000 (12:41 +0000)
Gives option for fixing if badly formatted HTML is inserted.
Closes #310

resources/views/base.blade.php
routes/web.php

index a98a37131aaf30f487a65fae983cd645def94e04..bb00ce19e9ecbbcebf343826a22396295c83a5e7 100644 (file)
 
     @include('partials/custom-styles')
 
-    <!-- Custom user content -->
-    @if(setting('app-custom-head'))
+    @if(setting('app-custom-head') && \Route::currentRouteName() !== 'settings')
+        <!-- Custom user content -->
         {!! setting('app-custom-head') !!}
+        <!-- End custom user content -->
     @endif
 </head>
 <body class="@yield('body-class')" ng-app="bookStack">
index 076ffb94f133e648a0298a4e9e588ea3634aba95..8d166f1d6090245f4f07adfbfc4b0f70b174c3a9 100644 (file)
@@ -129,7 +129,7 @@ Route::group(['middleware' => 'auth'], function () {
 
     // Settings
     Route::group(['prefix' => 'settings'], function() {
-        Route::get('/', 'SettingController@index');
+        Route::get('/', 'SettingController@index')->name('settings');
         Route::post('/', 'SettingController@update');
 
         // Users