Hi,
Thanks for this great module. I found a problem in line 87:
$text = substr_replace($text, "<img src='".$mimetex_cgi_path_http."?".urlencode(str_replace(' ', '', $mimetex_formula))."' title='".$alt_mimetex_formula."' alt='".$alt_mimetex_formula."' style=\"vertical-align: middle;\" >",$pos,strlen($tex_matches[0][$i]));
In case my TeX command is something like "a+\small b+c", it renders it as "a+\smallb+c". "\smallb" is not valid TeX, and the output image contains an error. This is caused by the str_replace(' ', '', ...) part, so I suggest you leave it out.
Comments
Comment #1
leop commentedFurthermore, since in the
urlencodefunction, spaces are translated to "+" signs, I suggest you userawurlencodeinstead.Comment #2
dwees commentedI've made the changes, tested that they work as advertised, and committed them to the module repository. You should expect to be able to download a new version of this within 12 hours.
If someone could create a patch for this, that would be great, my patch software is horrible, I need to find some new software for this.