Support » Plugin: WP Fastest Cache » WPFC + Katex issue with backslashes

• Resolved bigfatfrodo

(@bigfatfrodo)

Hi,

I have the Katex plugin on my website and displaying some math formulas with it. When enabling WP Fastest Cache, some of the Katex blocks look weird. I narrowed it down to the way the Katex “code” is changed in the cached version as opposed to the “live” one.

With WPFC Disabled, the HTML source looks like this (correct):
<div class=”wp-block-katex-display-block katex-eq” data-katex-display=”true”>

S = \sqrt[]{(p-a)\cdot(p-b)\cdot(p-c)\cdot(p-d)}\\\;\\p = \frac{a+b+c+d}{2}

</div>

With WPFC Enabled, in the cached HTML source it looks like some backslash processing took place before the p = \frac area:
<div class=”wp-block-katex-display-block katex-eq” data-katex-display=”true”>

S = \sqrt[]{(p-a)\cdot(p-b)\cdot(p-c)\cdot(p-d)}\\;\p = \frac{a+b+c+d}{2}

</div>

The result is that the instead of just displaying ‘p =’, the cached version shows ‘;\p’. This happens throughout the site, being rather disturbing.

Thanks,
BFF

Viewing 8 replies - 1 through 8 (of 8 total)
• Plugin Author Emre Vona

(@emrevona)

I will fix and let you know.

Plugin Author Emre Vona

(@emrevona)

Hi again, I fixed the problem. please delete wp fastest cache and download the following version to get the latest changes.

(@bigfatfrodo)

Thank you for the quick response. I’ll give it a try.

Plugin Author Emre Vona

(@emrevona)

(@bigfatfrodo)

There is definitely an improvement. Now the backslashes are not escaped anymore. But the semicolon still is.

In the no-cache version, this string looks like this:
\\\;\\p

With the updated wp-fastest-cache version, the source is changed to this:
\\;\\p

This causes KaTex to display the semicolon, where it should otherwise be just an empty line.

Thanks!

Plugin Author Emre Vona

(@emrevona)

I fixed the problem. please delete wp fastest cache and download the following version to get the latest changes.

(@bigfatfrodo)

Looks good, many thanks. Can I continue using this version until a new one is released officialy?

Plugin Author Emre Vona

(@emrevona)

Exactly, you can.

you are welcome 🙂 if you vote, you make me so happy.
https://wordpress.org/support/plugin/wp-fastest-cache/reviews/?rate=5#new-post

Viewing 8 replies - 1 through 8 (of 8 total)
• You must be logged in to reply to this topic.