autobus
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: I keep getting multiple apostrophe’sOK, one more post and I’m done. Maybe.
To fix the issue once and for all I had to do the complete opposite of what I originally thought the problem was. Only by commenting out
@ini_set('magic_quotes_sybase', 0);inwp-settings.phpwas I finally able to rid myself of the doubled single quote madness. I checked php.ini and the default is On formagic_quotes_sybase. Go figure – “On” is supposed to cause this problem, not fix it.I would love it if somebody could tell me why this is. In the meantime, I have a hacked wp-settings.php file.
Forum: Fixing WordPress
In reply to: I keep getting multiple apostrophe’sScratch that. WordPress is already turning magic_quotes_sybase off (wp-settings.php). So even with it off I’m having this issue. If I bypass addslashes() altogether, I do not get the doubled single quotes, so I know this is the problem source – just don’t know why.
Very weird.
Forum: Fixing WordPress
In reply to: I keep getting multiple apostrophe’sWell, I solved it (for my situation, anyway).
WordPress uses PHP’s
addslashes()function to escape quotes before inserting into the database. Ifmagic_quotes_sybaseis turned on in your PHP installation (which it was for mine), this means adding another single quote as the escape sequence instead of the backslash, which mysql (and most others) expects.PHP’s documentation for
addslashes()indicates that it’s better to use the DBMS-specific escape function(s), which WordPress is not currently doing (mysql_escape_string()is commented out inwp-db.phpbecause supposedly it is causing other problems).Hope this proves helpful to somebody.
Forum: Fixing WordPress
In reply to: I keep getting multiple apostrophe’sWas this ever solved?
I’m having the same problem myself. When saving, the POST content parameter only passes a single apostrophe, but I always get back two. This only occurred after upgrading from 2.6.5 to 2.7.1. Old posts with apostrophes are not affected – only ones created with the new version.