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

Entry `url_title` does not match CP/URL `urlSlug` output #22

obfuscode opened this Issue Nov 26, 2018 · 3 comments


None yet
3 participants
Copy link

obfuscode commented Nov 26, 2018

Description of the problem
The Channel Entry URL Title only needs to pass the validateUrlTitle method and then accepts whatever the user enters so URLs like ThIs_is.-Cool----....WHAT save exactly like that whereas the urlSlug() method returns this_is-cool-....what.

The real-world use case for this is saving a person's name like J. P. Morgan which creates an EE URL Title of j.-p.-morgan but the urlSlug regex specifically forbids the "dot-hypen" or "dot-underscore" (depending on what separator setting you have) so calling urlSlug results in j-p-morgan.

How To Reproduce
Steps to reproduce the behavior:

  1. Create an entry with a Title of "J. P. Morgan"
  2. Save Entry
  3. Notice the URL Title violates the dot-[separator] rule

Environment Details:

  • Version: 5.0.1
  • PHP Version: 7.1
  • MySQL Version: 5.7
  • OS: macOS (Mojave)
  • Web Server: nginx

Possible Solution
Pass the URL Title through the CP/URL service on save (and for the JS generation).


This comment has been minimized.

Copy link

t1mwillis commented Dec 10, 2018

@kevincupp does the closed tag mean that a fix for this will be released? Thanks.


This comment has been minimized.

Copy link

kevincupp commented Dec 10, 2018

Not necessarily. But in this case, there is a commit and a tag of Accepted, so yes.


This comment has been minimized.

Copy link

t1mwillis commented Dec 10, 2018

@kevincupp 👍

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