Skip to content

Commit

Permalink
fix: issue with json and HTML causing invalid JSON (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
trovster authored May 27, 2022
1 parent e46a331 commit 8cf053e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/json.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"id": "{{ url($item->id) }}",
"title": "{{ $item->title }}",
"url": "{{ url($item->link) }}",
"content_html": "{!! str_replace('"', '\\"', $item->summary) !!}",
"summary": "{!! str_replace('"', '\\"', $item->summary) !!}",
"content_html": {!! json_encode($item->summary) !!},
"summary": {!! json_encode($item->summary) !!},
"date_published": "{{ $item->timestamp() }}",
"date_modified": "{{ $item->timestamp() }}",
"authors": [{ "name": "{{ $item->authorName }}" }],
Expand Down

0 comments on commit 8cf053e

Please sign in to comment.