Skip to content

Purifier breaks UTF8 chars #77

Description

@yarkm13

Minimal example:

$json = '{"time":1778853048875,"version":"2.31.0","blocks":[{"id":"mhTl6ghSkV","type":"paragraph","data":{"text":"Hey. Meet the new Editor. On this picture you can see it in action. Then, try a demo 🤓"}}]}'
BumpCore\EditorPhp\EditorPhp::make($json)->toArray();

note new Editor

result

[
    "time" => 1778853048875,
    "blocks" => [
      [
        "type" => "paragraph",
        "data" => [
          "text" => b"Hey. Meet the new Editor. On this picture you can see it in action. Then, try a demo 🤓",
        ],
      ],
    ],
    "version" => "2.31.0",
  ]

note how "text" no longer string, but binary,   replaced by space and emoji broken

toJson() conversion will not be possible

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions