]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7044 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 21 Aug 2024 12:57:03 +0000 (14:57 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 21 Aug 2024 12:57:03 +0000 (14:57 +0200)
app/Models/ToolWebflow.php

index 7329eac7d7c5f4aeabb6dda2c2a65ab0b61ad21b..25186f95eafc61869cbe16bfc2a1ac09d1a020d6 100644 (file)
@@ -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\/\\\\&quot;)(.*)(\\\\&quot;")/';
         $html = preg_replace($regex, '\"$2\"', $html);
+        $html = str_replace($strippedSlashRelative . '#', '#', $html);
 
         if (!preg_match('/data-wf-page="([^\"]+)"/', $html, $m)) {
             return;