Joomla removes apostrophe in article's titles

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
Frenchbiz2023
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri May 26, 2023 12:36 pm

Joomla removes apostrophe in article's titles

Post by Frenchbiz2023 » Mon May 27, 2024 2:00 pm

Hello,

Since this summer I have noticed Joomla is removing apostrophe in the alias field.

For Example before for an article title like L'hôtel est beau the generated alias was l-hotel-est-beau
Now for the same title the generated alias is lhotel-est-beau.

How can I do to make joomla generates the alias exactly like before replacing ' with-?

It's very strange that a system like joomla is changing the rules all the time...

gws
Joomla! Champion
Joomla! Champion
Posts: 6057
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Joomla removes apostrophe in article's titles

Post by gws » Mon May 27, 2024 2:10 pm

Add the alias you want manually.

Frenchbiz2023
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri May 26, 2023 12:36 pm

Re: Joomla removes apostrophe in article's titles

Post by Frenchbiz2023 » Mon May 27, 2024 2:17 pm

@gws : yes but it's not practical. I would like to find an automated solution and understand why it changed since this summer... Before the apostrophe was always replaced by a -

gws
Joomla! Champion
Joomla! Champion
Posts: 6057
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Joomla removes apostrophe in article's titles

Post by gws » Mon May 27, 2024 2:26 pm

Just a guess, ' is used as an escape character in php?

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2796
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Joomla removes apostrophe in article's titles

Post by ceford » Mon May 27, 2024 9:47 pm

Aliases may only consist of lower case characters and dashes: https://docs.joomla.org/Alias

Anything else in the title is converted to a dash in the alias.

gws
Joomla! Champion
Joomla! Champion
Posts: 6057
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Joomla removes apostrophe in article's titles

Post by gws » Mon May 27, 2024 9:54 pm

That would appear to not be happening, surely it should convert the ' to a - as it used to? I don't know.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44176
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla removes apostrophe in article's titles

Post by Webdongle » Mon May 27, 2024 9:57 pm

ceford wrote: Mon May 27, 2024 9:47 pm Aliases may only consist of lower case characters and dashes: https://docs.joomla.org/Alias

Anything else in the title is converted to a dash in the alias.
Yes he knows that but that is not the issue. The issue is the the ' was replaced with a - but now it runs the l and the h together.
i.e.
l'h used to change to l-h now it changes to lh
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

mtgg
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Apr 04, 2024 11:17 pm

Re: Joomla removes apostrophe in article's titles

Post by mtgg » Mon May 27, 2024 11:42 pm

Apostrophe is not a "legal" character in Joomla URLs. You can use apostrophes as "escape" characters; I suspect they are used to attempt some kinds of hacking but I don't know.

Webdongle wrote: Mon May 27, 2024 9:57 pm... but that is not the issue. The issue is the the ' was replaced with a - but now it runs the l and the h together
Interesting: in Joomla 3, apostrophes were replaced by hyphens; in Joomla 4.4.4 and 5.1.0, apostrophes are stripped out. Perhaps someone can find out when/why the developers changed this (not that it matters much however it's done these days)?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44176
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla removes apostrophe in article's titles

Post by Webdongle » Tue May 28, 2024 12:21 am

A ggle search

Code: Select all

site:https://issues.joomla.org/ title alias
found
https://issues.joomla.org/tracker/joomla-cms/35856
Which lead to
https://github.com/joomla/joomla-cms/pull/32924
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

mtgg
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Apr 04, 2024 11:17 pm

Re: Joomla removes apostrophe in article's titles

Post by mtgg » Tue May 28, 2024 1:26 am

Thanks. It was an intentional change.


Post Reply

Return to “General Questions/New to Joomla! 4.x”