Drupal 7 – Backslashes being added to quotes on Blacknight Hosting

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:

 

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..

 
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *