This is a very strange and annoying problem, when editing content on a Drupal 7 installation backslashes were being automatically put before quotes – a real pain especially when editing HTML!
This is a well known issue caused by a silly PHP5 module called ‘magic quotes’. Anyway on Blacknight I found that the only way to get rid of the problem was to make sure that magic quotes functionality was turned on in .htaccess – this would force Drupal to successfully work around the issue. The way to do this is to make sure the the following is included the .htaccess file:
php_flag magic_quotes_gpc on
php_flag magic_quotes_sybase on
This seems counter intuitive – surely we want to turn magic quotes off? however, including these lines in the file lets Drupal 7 know that the magic quotes functionality is turned on and then it successfully fixes the problem itself..
Here’s a decent article that I found about programmatically creating content in drupal 7:
Address: 43 Churchgate, Wicklow, Co. Wicklow, Ireland.
Telephone: +353 87 2236429
- mktime() always uses local time zone and converts from UTC
- Estimate Solar Azimuth and Elevation given GPS position and time.
- Creating time_t value from a UTC date and time in C
- Speed up Encoding of JPEG images on Embedded System
- libjpeg example – encode JPEG to memory buffer instead of file
- Get the Subversion (SVN) URL for a file using Tortoise SVN?
- Fire-And-Forget wrapper for sending simple UDP data using boost::asio libraries
- Use PIC Timer2 not Timer0 for accurate Interval Timing on an Embedded system