Skip to content

ZWJ emoji sequences (e.g. πŸ’†β€β™€οΈ) are broken by clean() in v4.0.1Β #50

Description

@seth-hayward

Hello!

In v4.0.1, Blasp::check()->clean() appears to strip Unicode format characters (\p{Cf}), which breaks valid emoji ZWJ sequences.

For example, the emoji πŸ’†β€β™€οΈ (woman getting massage) is rendered as two separate emojis after calling clean(), instead of a single combined glyph.

This behavior did not occur in previous versions (4.0.0).

Reproduction:

$text = "Test πŸ’†β€β™€οΈ emoji";

$result = Blasp::check($text);

$output = $result->clean();

echo $output;

Expected Behavior

The emoji should remain intact:

Test πŸ’†β€β™€οΈ emoji

Actual Behavior

The ZWJ sequence is broken, resulting in something like:

Test πŸ’† ♀️ emoji

(or similar split rendering depending on platform)

Thank you for your package. This has been very helpful to me on my Laravel app.

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