Closed pbelmans closed 11 years ago
Hi, I tried to make some headway on this bug. My feeling is that it has something to do with accents; I haven't so far been able to get to the bottom of it. But I have a question. The line
$code = preg_replace('/<a href="\/([A-Za-z0-9\/\-]+)">([A-Za-z0-9\-]+)<\/a>/', '<a href="' . href("") . '$1">$2</a>', $code);
in the function preprocessCode seems to be setup intentionally to not parse correctly the internal references in the LaTeX (which have now been mangled by the call to htmlentities)? It is easy to fix this (by removing the first escaped slash). Anyway, later (in both use cases of preprocessCode) there is an additional preg_replace to fix these internal references. I think this is just too confusing.
Also, you can remove lines 136 and 137 (because we fixed 01YC).
Anyway, can you add some comments explaining how the functions convertLaTeX
and preprocessCode
are supposed to work and how they are supposed to be used?
It's a mystery for now, but whereas the first reference in tag 01FB is parsed correctly it is just plaintext in its enclosing section, which is tag 01F7. Things seem to be working correctly otherwise, so I'm confused.