Try to avoid writing these kind of symbols. By using these characters you create html invalid source code at your website.
Enter the special characters as [http://webdesign.about.com/od/localization/l/blhtmlcodes-punc.htm]html entities[/url]. Use the numerical value for XHTML compliance. So, for single quote: '
$pat = "/([\']|[\"]|[\$]|[\#]|[\<]|[\>]|[\*]|[\%]|[\~]|[\`]|[\^]|[\|]|[\\\])/";
$pat = "/([\"]|[\$]|[\#]|[\<]|[\>]|[\*]|[\%]|[\~]|[\`]|[\^]|[\|]|[\\\])/";
Ooooops, you wrote this for comments, I didn't noticed that before, sorry. To allow the quote char you must remove it from the replacements pattern. File components/com_content/content.phpline 2201 (for Elxis 2009.3 - for other versions look somewhere near that)Replace this:Code: [Select]$pat = "/([\']|[\"]|[\$]|[\#]|[\<]|[\>]|[\*]|[\%]|[\~]|[\`]|[\^]|[\|]|[\\\])/";With this:Code: [Select]$pat = "/([\"]|[\$]|[\#]|[\<]|[\>]|[\*]|[\%]|[\~]|[\`]|[\^]|[\|]|[\\\])/";The above change is for the content comments (not for eBlog). You might need to run the addslashes function (depending on the magic quotes settings on your site) on the fial string before insert it into the database. Else you might face SQL injection issues and errors. $commessage = addslashes($commessage); //only if magic quotes are off
$pat = "/([\$]|[\#]|[\<]|[\>]|[\*]|[\%]|[\~]|[\`]|[\^]|[\|]|[\\\])/";$commessage = preg_replace($pat, '', $commessage); $commessage = addslashes($commessage); //magic quotes are off on my site