text is not render correctly after apostrophe, its not problem of mimetex but problem of math filter

Comments

dwees’s picture

Can you point me at a page where I can see this in action? Unfortunately I don't have enough information to properly debug this problem.

Dave

redolent@life.math.ntu.edu.tw’s picture

if you type [tex]f'(x)[/tex] you will get "f". You must type [tex]f%27(x)[/tex] to get f'(x) correctly

dwees’s picture

Okay, looks like I need to include urlencode() in the function. I'll do some testing, this may be a relatively easy fix.

Dave

dwees’s picture

Assigned: redolent@life.math.ntu.edu.tw » dwees
Status: Active » Closed (fixed)

If you change:


$text = substr_replace($text, "<img src='".$mimetex_cgi_path_http."?".$mimetex_formula."' title='".$alt_mimetex_formula."' alt='".$alt_mimetex_formula."' style=\"vertical-align: middle;\" >",$pos,strlen($tex_matches[0][$i]));

to


$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]));

then this problem should be fixed, or at least it is on my server.

Dave