[wp-trac] [WordPress Trac] #2431: Categories cause database errors
when they contain apostrophes (').
WordPress Trac
wp-trac at lists.automattic.com
Sat Feb 11 18:10:04 GMT 2006
#2431: Categories cause database errors when they contain apostrophes (').
-----------------------+----------------------------------------------------
Id: 2431 | Status: new
Component: General | Modified: Sat Feb 11 18:10:04 2006
Severity: normal | Milestone:
Priority: normal | Version: 2.0
Owner: anonymous | Reporter: normal1
-----------------------+----------------------------------------------------
I created a category called How-to's. When accessing the how-tos page
directly to view it's posts I get this error:
{{{
WordPress database error: [syntax error near 's', url =
'%2Fuser%2Fcategory%2Fhow-tos%2F' WHERE username='admin'' at line 1]
UPDATE wp_useronline SET timestamp = '1139652245', ip = '68.7.207.246',
location = 'My last name, My story » How-to's', url = '%2Fuser%2Fcategory
%2Fhow-tos%2F' WHERE username='admin'
WordPress database error: [syntax error near 's', '%2Fuser%2Fcategory
%2Fhow-tos%2F')' at line 1]
INSERT INTO wp_useronline VALUES ('1139652245', 'admin', '68.7.207.246',
'My last name, My story » How-to's', '%2Fuser%2Fcategory%2Fhow-tos%2F')
}}}
This tells me that the database is freaking out about the 's in the "How-
to's" name of the category. This should not happen.
Also, I should point out that these errors go away when the name of the
category is escaped by using a \ - i.e. How-to\'s - However it still shows
the category listed as How-to\'s on the main page.
Cheers
--
Ticket URL: <http://trac.wordpress.org/ticket/2431>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list