Parcourir la source

Update endpoint.blade.php

Added JSON_UNESCAPED_SLASHES to prettify json output. Strings with slashes (for example a url: https://www.google.com) was rendering with back slashes added https:\/\/www.google.com\/
Devin il y a 3 ans
Parent
commit
e10d4f5053
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      resources/views/themes/default/endpoint.blade.php

+ 1 - 1
resources/views/themes/default/endpoint.blade.php

@@ -44,7 +44,7 @@
 @else
 @php($parsed = json_decode($response->content))
 {{-- If response is a JSON string, prettify it. Otherwise, just print it --}}
-<code class="language-json">{!! htmlentities($parsed != null ? json_encode($parsed, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) : $response->content) !!}</code>
+<code class="language-json">{!! htmlentities($parsed != null ? json_encode($parsed, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) : $response->content) !!}</code>
 @endif </pre>
     @endforeach
 @endif