Skip to content

Commit

Permalink
fix(comments): stop url parsing on wysiwyg images
Browse files Browse the repository at this point in the history
  • Loading branch information
ScuffedNewt authored Aug 28, 2024
1 parent d9f7c41 commit 214ddf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Comment/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function getEndOfThreadAttribute() {
public function getCommentAttribute() {
if (config('lorekeeper.settings.wysiwyg_comments')) {
return preg_replace_callback(
'/(?<!href=")(?<!\()(https?:\/\/[^\s]+)/',
'/(?<!href=")(?<!src=")(?<!\()(https?:\/\/[^\s]+)/',
function ($matches) {
$url = $matches[1];
$parsedUrl = parse_url($url);
Expand Down

0 comments on commit 214ddf4

Please sign in to comment.