瀏覽代碼

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 3 年之前
父節點
當前提交
e10d4f5053
共有 1 個文件被更改,包括 1 次插入1 次删除
  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