]> _ Git - fluidbook-toolbox.git/commitdiff
#7542
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Jun 2025 14:17:48 +0000 (16:17 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Jun 2025 14:17:48 +0000 (16:17 +0200)
app/Fluidbook/Compiler/Accessibility.php

index 9cc331c6d1bd8775ea90620c56115628499155e8..65f65b3cbbd3e1fd1d946f88a80b5b61ea753992 100644 (file)
@@ -3,6 +3,7 @@
 namespace App\Fluidbook\Compiler;
 
 use App\Models\FluidbookHealthIssues;
+use Cubist\Azure\TTS\Api;
 use Cubist\Util\Files\Files;
 use Cubist\Util\Text;
 use Exception;
@@ -66,7 +67,7 @@ trait Accessibility
                     $voice = $e[1];
                 }
 
-                $text = strip_tags($text, '<break><say-as><audio><p><s><sub><mark><prosody><emphasis><par><seq><media><phoneme><voice><lang>');
+                $text = Api::stripNonSSMLTags($text);
                 $hash = hash('sha256', $engine . ':' . $voice . '_^_' . $text);
                 $fname = $hash . '.mp3';
                 $dir = Files::mkdir($this->getFluidbook()->protected_path('audiodescription'));