Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#14269 closed defect (bug) (fixed)

Add capital_P_dangit patch to forums

Reported by: michaelh's profile michaelh Owned by:
Milestone: WordPress.org Priority: normal
Severity: normal Version:
Component: WordPress.org Site Keywords:
Focuses: 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)

#1 @ryanduff
15 years ago

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

#2 @mrmist
15 years ago

-1 this could cause alot of issues...

#3 @matt
15 years ago

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

Thanks for pointing out the oversight. :)

#4 @matt
15 years ago

  • Milestone changed from Awaiting Review to WordPress.org site

#5 @GDragoN
15 years ago

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

#6 @matt
15 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.

#7 @GDragoN
15 years ago

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

Note: See TracTickets for help on using tickets.