Update EditHistoryModal, fix caption rendering

This commit is contained in:
Daniel Supernault 2023-05-25 02:27:03 -06:00
parent 58523b6d98
commit 0f803446dd
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 5 additions and 2 deletions

View file

@ -44,8 +44,9 @@ class StatusEditController extends Controller
$cached = StatusService::get($status->id, false);
$res = $status->edits->map(function($edit) use($cached) {
$caption = nl2br(strip_tags(str_replace('</p>', "\n", $edit->caption)));
return [
'content' => Autolink::create()->autolink($edit->caption),
'content' => Autolink::create()->autolink($caption),
'spoiler_text' => $edit->spoiler_text,
'sensitive' => (bool) $edit->is_nsfw,
'created_at' => str_replace('+00:00', 'Z', $edit->created_at->format(DATE_RFC3339_EXTENDED)),

View file

@ -121,7 +121,9 @@
</div>
</div>
</template>
<p class="lead my-4" v-html="allHistory[historyIndex].content"></p>
<div class="w-100 my-4 px-4 text-break justify-content-start">
<p class="mb-0" v-html="allHistory[historyIndex].content"></p>
</div>
</div>
</template>