Skip to content

Slug: Single opening quotation mark in reference field converted to apostrophe (U+0027) for slug field #9590

@gusgroe

Description

@gusgroe

Bug description

When using a single opening (English) quotation mark (‘) inside the slug reference field, the quotation mark is replaced with an apostrophe inside the slug field and a collection entry can't be posted (without modification) because the slug is invalid.

How to reproduce

  1. Create a new collection entry where slugs is used.
  2. Type some random tekst together with the quotation mark (‘) in the slug reference field
  3. In the slug field you'll see the apostrophe (U+0027)
  4. Attempting to save the item will generate an error "The given data was invalid"
  5. The full result from the call (HTTP 422):
    { "message": "The given data was invalid.", "errors": { "slug": [ "May only contain letters, numbers, dashes and underscores." ] } }

Logs

No response

Environment

Environment
Application Name: <redacted>
Laravel Version: 10.43.0
PHP Version: 8.2.15
Composer Version: 2.7.1
Environment: production
Debug Mode: OFF
URL: <redacted>
Maintenance Mode: OFF

Cache
Config: CACHED
Events: NOT CACHED
Routes: CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: redis
Session: file

Statamic
Addons: 20
Antlers: runtime
Stache Watcher: Disabled
Static Caching: half
Version: 4.45.0 PRO

Statamic Addons
oaked/statamic-resend-form-submissions: dev-master
rias/statamic-data-import: 1.3.0
rias/statamic-redirect: 3.6.1
roorda-ict/statamic-entries-export: 2.1.0
steets/statamic-addon-browser-lang-redirect: 0.1.8
steets/statamic-addon-extend-forms: 0.1.21
steets/statamic-addon-factory: 0.1.5
steets/statamic-addon-full-sitemap: 0.2.2
steets/statamic-addon-google-address: 0.1.8
steets/statamic-addon-mapbox-address: 0.1.5
steets/statamic-addon-markdown-text-field: 0.1.6
steets/statamic-addon-meilisearch: 0.1.1
steets/statamic-addon-permissions: 0.1.2
steets/statamic-addon-recaptcha: 0.2.2
steets/statamic-addon-responsive-images: 0.4.1
steets/statamic-addon-search-index-transformers: 0.2.9
steets/statamic-addon-steets-theme: 0.2.2
steets/statamic-addon-submit-button-field: 0.1.3
steets/statamic-addon-uuid: 0.1.3
steets/statamic-starter-kit: 0.1.15

Installation

Starter Kit using via CLI

Antlers Parser

Runtime (default)

Additional details

No response

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