We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30d3df4 commit cde153bCopy full SHA for cde153b
src/Fieldtypes/Concerns/ResolvesStatamicUrls.php
@@ -13,11 +13,11 @@ trait ResolvesStatamicUrls
13
*/
14
protected function resolveStatamicUrls(string $content)
15
{
16
- return preg_replace_callback('/([("])statamic:\/\/([^()"]*)([)"])/im', function ($matches) {
+ return preg_replace_callback('/([("])statamic:\/\/([^()"?#]*)([^()"]*)([)"])/im', function ($matches) {
17
$data = Data::find($matches[2]);
18
- $url = $data ? $data->url() : '';
+ $url = $data ? $data->url().$matches[3] : '';
19
20
- return $matches[1].$url.$matches[3];
+ return $matches[1].$url.$matches[4];
21
}, $content);
22
}
23
0 commit comments