diff --git a/src/Fieldtypes/Bard.php b/src/Fieldtypes/Bard.php index ab8b2f958c..d92c3bec0b 100644 --- a/src/Fieldtypes/Bard.php +++ b/src/Fieldtypes/Bard.php @@ -370,7 +370,7 @@ public function preProcess($value) } if (is_string($value)) { - $value = str_replace('statamic://', '', $value); + $value = str_replace('src="statamic://', 'src="', $value); $doc = (new Augmentor($this))->renderHtmlToProsemirror($value); $value = $doc['content']; } elseif ($this->isLegacyData($value)) { diff --git a/tests/Fieldtypes/BardTest.php b/tests/Fieldtypes/BardTest.php index f00c8b12e9..c81004c067 100644 --- a/tests/Fieldtypes/BardTest.php +++ b/tests/Fieldtypes/BardTest.php @@ -413,7 +413,7 @@ public function it_converts_plain_html_into_prosemirror_structure() 'content' => [ ['type' => 'text', 'text' => 'Second '], ['type' => 'text', 'text' => 'paragraph', 'marks' => [ - ['type' => 'link', 'attrs' => ['href' => 'entry::foo']], + ['type' => 'link', 'attrs' => ['href' => 'statamic://entry::foo']], ]], ['type' => 'text', 'text' => '. '], ['type' => 'image', 'attrs' => [