Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14269 closed defect (bug) (fixed)

Add capital_P_dangit patch to forums

Reported by: michaelh Owned by:
Priority: normal Milestone: WordPress.org
Component: WordPress.org site Version:
Severity: normal Keywords:
Cc:

Description

Too many times, in the title and the topic content fields see wordpress and Wordpress typed, so the capital_P_dangit fix should be installed in the forums.

Change History (7)

I think there should be alot more tickets like this. +1

-1 this could cause alot of issues...

comment:3   matt3 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Thanks for pointing out the oversight. :)

comment:4   matt3 years ago

  • Milestone changed from Awaiting Review to WordPress.org site

Like it or not, capital_P_dangit() function included with WP 3.0 is just bad. Simple search and replace has proven as problem, and the only solution that will actually work is to use a function that uses regular expressions and with that ignores the WordPress word in the URL's.

I wrote such function, and it's a part of my GD Press Tools plugin. Due to some limitations in PHP regular expression engine, preg_replace function can't be used in this case, but the function I wrote uses preg_match_all and that replaces the word based on results from this function.

GD Press Tools on WP.org

GD Press Tools Home

comment:6   matt3 years ago

If you have in-the-wild cases of the new method Mark did messing up text, probably best to start a new ticket with the improvement. It's a simple implementation, but I haven't seen any examples of it messing up links anymore.

OK thanks. I will check the Mark's function.

Note: See TracTickets for help on using tickets.