Opened 21 years ago
Closed 21 years ago
#2431 closed defect (bug) (invalid)
Categories cause database errors when they contain apostrophes (').
| Reported by: | normal1 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.0 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Invaild. That error is caused by the Users Online plugin, it worksforme without that plugin installed. Take it up with the plugin author.
(I should point out that "How-to's" is an incorrect usage of the apostrophe anyway :))