We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2259e20 + 78f635d commit 5368488Copy full SHA for 5368488
app/Support/Markdown.php
@@ -114,8 +114,8 @@ protected function convertSpecialBlockquotes(): static
114
public function absoluteImageUrls(string $baseUrl): static
115
{
116
$this->content = preg_replace(
117
- pattern: '/src=["\'](?!https?:\/\/)([^"\']+)["\'][^>]/i',
118
- replacement: 'src="' . $baseUrl . '$1" ',
+ pattern: '/\b(src|srcset)\s*=\s*(["\'])(?!https?:\/\/|data:|\/\/)([^"\']+)\2/i',
+ replacement: '$1=$2' . $baseUrl . '$3$2',
119
subject: $this->content
120
);
121
0 commit comments