Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy Paste Causes a Crash #824

Open
dmarcs opened this issue Jun 23, 2023 · 0 comments
Open

Copy Paste Causes a Crash #824

dmarcs opened this issue Jun 23, 2023 · 0 comments
Labels
type:bug Something isn't working

Comments

@dmarcs
Copy link

dmarcs commented Jun 23, 2023

Description

What does the bug consist in?
Error 500

Environment

Which version of MathType does this happen in?
8.3.1

What is the relevant software and their versions?
CKEditor5

  • Editor (CKEditor, Froala, TinyMCE, etc.)
    CKEditor5
  • Framework (Angular, React, etc.)
    Angular
  • Browser (Chrome, Firefox, etc.)
    Chrome
  • Operating System (Windows, macOS, Ubuntu, etc.)
    CentOS

Steps to reproduce

What are the steps needed to reproduce the bug?
Please be specific.

  1. Go to https://ckeditor.com/docs/ckeditor5/latest/features/math-equations.html

  2. Insert angle brackets with anything in the brackets for example
    image

  3. Copy and paste the angle brackets

  4. Try to type something in CKEditor5 (you can't anymore since copy paste causes it to crash)

image

The reason this happens is because the mml that gets sent to https://www.wiris.net/demo/plugins/app/showimage isn't converted to html entities when you paste into CKEditor

<math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced open="<" close=">"><mrow><mi>t</mi><mi>e</mi><mi>s</mi><mi>t</mi></mrow></mfenced></math>

Normally when you insert from MathType, here's what gets sent as mml. < and > instead of < and > are the 2 differences.

<math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced open="&#60;" close="&#62;"><mrow><mi>t</mi><mi>e</mi><mi>s</mi><mi>t</mi></mrow></mfenced></math>

Expected result

What is the expected outcome of the steps above?

CKEditor5 shouldn't crash. You should be able to copy and paste a MathType formula with angle brackets, and still be able to type in CKEditor.

Actual result

What is the actual outcome of the steps above?

Once you copy and paste, you can't type anything into CKEditor

Other details

Is there anything else to consider?

@dmarcs dmarcs added the type:bug Something isn't working label Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant