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.
1 parent 1ac70c8 commit f5e9031Copy full SHA for f5e9031
app/Support/Markdown.php
@@ -114,9 +114,9 @@ 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" ',
119
- subject: $this->content
+ '/\b(src|srcset)\s*=\s*(["\'])(?!https?:\/\/|data:|\/\/)([^"\']+)\2/i',
+ '$1=$2' . $baseUrl . '$3$2',
+ $this->content
120
);
121
122
return $this;
0 commit comments