From: Vincent Vanwaelscappel Date: Wed, 21 Aug 2024 12:57:03 +0000 (+0200) Subject: wait #7044 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4f36160042bd8fa5a917104ed5683a93871e8c66;p=fluidbook-toolbox.git wait #7044 @2 --- diff --git a/app/Models/ToolWebflow.php b/app/Models/ToolWebflow.php index 7329eac7d..25186f95e 100644 --- a/app/Models/ToolWebflow.php +++ b/app/Models/ToolWebflow.php @@ -487,10 +487,12 @@ class ToolWebflow extends ToolboxTranslatableModel $urlmaps = $this->getURLMaps(); $urlmap = $urlmaps[$locale]; $origRelative = $relative; + $strippedSlashRelative=ltrim($relative,'/'); $html = file_get_contents($f->getPathname()); $regex = '/("https:\/\/' . $this->webflow . '.webflow.io\/\\\\")(.*)(\\\\"")/'; $html = preg_replace($regex, '\"$2\"', $html); + $html = str_replace($strippedSlashRelative . '#', '#', $html); if (!preg_match('/data-wf-page="([^\"]+)"/', $html, $m)) { return;