Create a new document
Save it
Edit it
Enter the following for the content:
Save and you get a MySQL error because the apostrophe is not escaped:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's name. ',richtext='1',template='10',menuindex='1',searchable='1',cacheable='1'' at line 1 »
SQL: UPDATE `testcom`.`modx_site_content` SET id='72',type='document',contentType='text/html',pagetitle='A',longtitle='',description='',alias='a',link_attributes='',published='1',pub_date='0',unpub_date='0',parent='8',isfolder='0',introtext='',content='A person's name. ',richtext='1',template='10',menuindex='1',searchable='1',cacheable='1',createdby='1',createdon='1197175442',editedby='1',editedon='1197219728',deleted='0',deletedon='0',deletedby='0',publishedon='1197175442',publishedby='1',menutitle='',donthit='0',haskeywords='0',hasmetatags='0',privateweb='0',privatemgr='0',content_dispo='0',hidemenu='1' WHERE id=72
I searched the forums and didn’t find anyone else with this problem. Surely I’m not the only one who uses apostrophes?? Any ideas on how I can fix this quickly?
Andy