diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 1ec7bbf4d..8b8eded8e 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -34,8 +34,8 @@ class CommentController extends Controller $reply = new Status(); $reply->profile_id = $profile->id; - $reply->caption = $comment; - $reply->rendered = e($comment); + $reply->caption = e(strip_tags($comment)); + $reply->rendered = $comment; $reply->in_reply_to_id = $status->id; $reply->in_reply_to_profile_id = $status->profile_id; $reply->save(); diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 1ce080245..704beea6c 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -47,7 +47,7 @@ class StatusController extends Controller $status = new Status; $status->profile_id = $profile->id; - $status->caption = $request->caption; + $status->caption = strip_tags($request->caption); $status->is_nsfw = $cw; $status->save(); diff --git a/resources/views/status/show.blade.php b/resources/views/status/show.blade.php index 80e7e41d3..8d2e27d67 100644 --- a/resources/views/status/show.blade.php +++ b/resources/views/status/show.blade.php @@ -16,17 +16,46 @@
NSFW / Hidden Image
-
{{$item->profile->username}} - {!!$item->rendered!!} {{$item->created_at->diffForHumans(null, true, true ,true)}} + {!! $item->rendered ?? e($item->caption) !!} {{$item->created_at->diffForHumans(null, true, true ,true)}}
@endforeach