⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Data with apostrophe's causing database error



afoote
  • profile picture
  • Member

Posted 17 November 2011 - 12:46 PM

If you have a varchar and try to save something with a single quote/apostrophe character in it, you'll get an SQL error.

The reason this appears to happen is because the author has used single quotes to open tags, e.g.
<input type = 'text' value='something's happened' />

If you change these in the main library to use double quotes, as is the recommendation for xhtml, then it works, e.g.
<input type = "text" value="something's happened" />

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 19 November 2011 - 19:32 PM

[quote name='afoote' timestamp='1321533998' post='46']
If you have a varchar and try to save something with a single quote/apostrophe character in it, you'll get an SQL error.

The reason this appears to happen is because the author has used single quotes to open tags, e.g.
<input type = 'text' value='something's happened' />

If you change these in the main library to use double quotes, as is the recommendation for xhtml, then it works, e.g.
<input type = "text" value="something's happened" />
[/quote]
I think you're right. I will changed it to the next version.

m_abdelfattah
  • profile picture
  • Member

Posted 12 March 2012 - 15:18 PM

This occurs with Double Quotes too :) !

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 12 March 2012 - 20:48 PM

This is fixed as for version 1.2 that probably will released in one ore two weeks.