Encodes & to &

This commit is contained in:
7u83 2023-12-12 12:35:58 +01:00
parent 89cf770472
commit bb37fc62bd
1 changed files with 3 additions and 0 deletions

View File

@ -65,6 +65,8 @@ class TextFormatterLatexMathML extends Textformatter {
// unescape esaped $-signs
$modifiedValue = str_replace('\$', '$',$modifiedValue);
$modifiedValue = str_replace('&','&',$modifiedValue);
// Save the node and its modified content for later replacement
$nodesForReplacement[] = array(
'node' => $node,
@ -90,6 +92,7 @@ class TextFormatterLatexMathML extends Textformatter {
// Define a callback function to convert the matched formula to MathML
function convertToMathML($matches) {
$cache = wire('cache');
# $cache->deleteAll();
// $matches[1] contains the matched substring within '$'
$formula = $matches[1];